File not found for HTML or ASPX pages in SharePoint Document Library
How to reproduce the issue
Create a simple HTML page with basic HTML in it, like the code snippet below. Rename it to test.aspx. The ASPX extension will allow the page to render in SharePoint as regular HTML. Lower your permissions to Member. Upload the page to a site Document Library.
The cause of the issue is maybe a recent change of the Member default security group permissions.
What we noticed is that when users with Member (Edit) permissions upload an HTML page with.ASPX extension, then the page does not open as expected. It gets downloaded when the user accesses it from the document library view. SharePoint throws an error of "File Not Found" when I try to access it directly by URL like https://mytenant.sharepoint.com/sites/mysite/Shared%20Documents/test1.aspx. This was the change that none announced anywhere, but we had content editors using HTML in document libraries, and they could not do upload the pages in a way that other users can open anymore.
Uploading the page as site collection admin or site owner to solve the problem
What I noticed is that uploading the page as site collection admin or as being part of the site Owners default group causes the page to open as expected. So, changing to higher permissions can solve that issue for now until Microsoft decides to do another change without notifying the users.
Adding more permissions to the Member should work as well, but not tested yet by me.
Also, you could try by editing the Edit permission level to select Add and Customize Pages permission for the members who are trying to upload the file. I personally have not tested this case, but It might work. Let me know in the comments below.
"If your admin allows custom script on a site, you need "Add and Customize Pages" permission (part of the Design and Full Control permission levels) to run the script in the file types listed above."