Skip to content
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

run error #82

Closed
mana-ai opened this issue Oct 26, 2019 · 2 comments
Closed

run error #82

mana-ai opened this issue Oct 26, 2019 · 2 comments

Comments

@mana-ai
Copy link

mana-ai commented Oct 26, 2019

Running "flutter pub get" in Blue-Diary...                          0.7s

Launching lib/main.dart on iPhone Xʀ in debug mode...

Compiler message:
lib/presentation/settings/SettingsBloc.dart:9:8: Error: Error when reading 'lib/Secrets.dart': No such file or
directory
import 'package:todo_app/Secrets.dart';
       ^
lib/presentation/settings/SettingsBloc.dart:129:44: Error: The getter 'SENDGRID_AUTHORIZATION' isn't defined for the
class 'SettingsBloc'.
 - 'SettingsBloc' is from 'package:todo_app/presentation/settings/SettingsBloc.dart'
 ('lib/presentation/settings/SettingsBloc.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named
'SENDGRID_AUTHORIZATION'.
          HttpHeaders.authorizationHeader: SENDGRID_AUTHORIZATION,
                                           ^^^^^^^^^^^^^^^^^^^^^^
Exception: Errors during snapshot creation: null
#0      KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:230:7)
<asynchronous suspension>
#1      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:526:25)
<asynchronous suspension>
#2      _BuildInstance.invokeTarget.<anonymous closure>
(package:flutter_tools/src/build_system/build_system.dart:481:35)
#3      new Future.sync (dart:async/future.dart:222:31)
#4      AsyncMemoizer.runOnce (package:async/src/async_memoizer.dart:43:45)
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:481:21)
<asynchronous suspension>
<asynchronous suspension>
#6      BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:419:36)
#7      _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#8      BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:400:28)
#9      buildWithAssemble (package:flutter_tools/src/bundle.dart:125:48)
#10     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#11     buildWithAssemble (package:flutter_tools/src/bundle.dart:99:31)
#12     BundleBuilder.build (package:flutter_tools/src/bundle.dart:75:11)
#13     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#14     BundleBuilder.build (package:flutter_tools/src/bundle.dart:52:21)
#15     IOSSimulator._sideloadUpdatedAssetsForInstalledApplicationBundle
(package:flutter_tools/src/ios/simulators.dart:453:28)
#16     IOSSimulator._setupUpdatedApplicationBundle (package:flutter_tools/src/ios/simulators.dart:420:11)
#17     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#18     IOSSimulator._setupUpdatedApplicationBundle (package:flutter_tools/src/ios/simulators.dart:419:46)
#19     IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:352:15)
#20     _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6)
#21     IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:339:32)
#22     FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:393:54)
#23     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#24     _rootRunUnary (dart:async/zone.dart:1132:38)
#25     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#26     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#27     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#28     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#29     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#30     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#31     _completeOnAsyncReturn (d
@giantsol
Copy link
Owner

Hi!
Yes, you would get a build error first because that SENDGRID_AUTHORIZATION variable is not pushed to github (that's my own secret key).
So simple solution is to remove import 'package:todo_app/Secrets.dart'; line and change HttpHeaders.authorizationHeader: SENDGRID_AUTHORIZATION, to HttpHeaders.authorizationHeader: '', and it should build fine :)

I've written about this issue here also!

@giantsol
Copy link
Owner

Closing this issue.
Reopen it if you still have the issue.
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants