-
Notifications
You must be signed in to change notification settings - Fork 52
Error while trying to load an asset: Flutter Web engine failed to fetch "assets/.env". HTTP request succeeded, but the server responded with HTTP status 404. #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same issue |
Same for me.
But my flutter web service worker has |
Same here, I found that changing the file name to 'env' works on firebase web projects https://{host}/assets/.env -> http 404 not sure if it is a firebase hosting problem overall, I need to change
and
|
I encountered the same problem. There was a hidden file setting in Before "hosting": {
"source": ".",
"ignore": [
"firebase.json",
"**/.*", // include .env file?
"**/node_modules/**"
]
} After "hosting": {
"source": ".",
"ignore": [
"firebase.json",
"**/.*",
"!.env", // add
"**/node_modules/**"
]
} |
|
Files that start with a dot (.) are considered a security concern on most web servers, such as Apache and Nginx, and access is typically restricted. This is not an issue with Flutter dotenv, but rather a default limitation of the web server. |
When i try to load my
.env
file it shows this error:I have added this too:
The text was updated successfully, but these errors were encountered: