java-james / flutter_dotenv

Loads environment variables from `.env`.
https://pub.dartlang.org/packages/flutter_dotenv
MIT License
213 stars 48 forks source link

[WEB] When using the Firebase hosting. Failed to read variables from .env file. #66

Open Jay-flow opened 2 years ago

Jay-flow commented 2 years ago

Issue

When using the Firebase hosting. Failed to read variables from .env file.

I thought it was solved in https://github.com/java-james/flutter_dotenv/issues/28#issuecomment-845602009 issue by @java-james , but there is still a problem.

image


When I change the file name to dotenv referring to the same issue(https://github.com/java-james/flutter_dotenv/issues/28), a different error is printed.

My Code:

void main() async {
  await dotenv.load(fileName: "dotenv");
  ...

  runApp(const MyApp());
}

image

Jay-flow commented 2 years ago

The cause of the error was found when setting the environment variable with the dotenv file.

image

This error occurs when I create it in this way.

SOME_ENV=abcdefg

But if I write it like this, it works normally.

SOME_ENV='abcdefg'
martinpelli commented 1 year ago

I am having this error when using this plugin, took me 4 hours to know it was this plugin as the error has a bad description. image I have my variables like SOME_ENV=abcdefg and changing them to SOME_ENV='abcdefg' doesn't work, the only solution that I have right now is to not use the plugin on web.

zahidshaikh9013 commented 2 weeks ago

Still no updates ????

zahidshaikh9013 commented 2 weeks ago

The cause of the error was found when setting the environment variable with the dotenv file.

image

This error occurs when �I create it in this way.

SOME_ENV=abcdefg

But if I write it like this, it works normally.

SOME_ENV='abcdefg'

This also does not help for me