You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having a CI/CD pipeline using GitHub actions. The .env file seems not to be picked up correctly there.
Everything works fine on my machine when I run the app. Also wenn I build the AppBundle, the .env file is in there.
For my own sanity check, I added a step in my pipeline to list the directory and the file is there and has the correct filesize:
However, when I try to access anything (e.g. static final isProduction = dotenv.env["IS_PRODUCTION"]), the value is basically undefined.
My main method looks like this:
But as shown in the directory step, the file seems to exist and as await dotenv.load(); doesn't throw an error, the file seems to work, but I just cant read data from it apparently.
The text was updated successfully, but these errors were encountered:
had the same issue, but got it resolved by passing in the file name when loading the .env await dotenv.load(fileName: '.env'); WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); runApp(const MyApp());
I am having a CI/CD pipeline using GitHub actions. The .env file seems not to be picked up correctly there.
Everything works fine on my machine when I run the app. Also wenn I build the AppBundle, the .env file is in there.
For my own sanity check, I added a step in my pipeline to list the directory and the file is there and has the correct filesize:

However, when I try to access anything (e.g.
static final isProduction = dotenv.env["IS_PRODUCTION"]
), the value is basically undefined.My main method looks like this:
No error is thrown when I am loading the file itself, but the content seems not to be there.
I am adding the .env file via a secret:
But as shown in the directory step, the file seems to exist and as
await dotenv.load();
doesn't throw an error, the file seems to work, but I just cant read data from it apparently.The text was updated successfully, but these errors were encountered: