flutter_dotenv icon indicating copy to clipboard operation
flutter_dotenv copied to clipboard

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

Open iCodePoet opened this issue 3 years ago • 8 comments

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

iCodePoet avatar Aug 11 '22 08:08 iCodePoet

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'

iCodePoet avatar Aug 11 '22 09:08 iCodePoet

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.

martinpelli avatar May 19 '23 18:05 martinpelli

Still no updates ????

zahidshaikh9013 avatar Sep 10 '24 08:09 zahidshaikh9013

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

zahidshaikh9013 avatar Sep 10 '24 08:09 zahidshaikh9013