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

flutter initialize failed #34

Closed
xiongdi9456 opened this issue Jun 2, 2020 · 3 comments · Fixed by #36
Closed

flutter initialize failed #34

xiongdi9456 opened this issue Jun 2, 2020 · 3 comments · Fixed by #36

Comments

@xiongdi9456
Copy link

I test demo's code in Flutter 1.19.0-2.0 pre.208, i got initialize failed.

[✓] Flutter (Channel master, 1.19.0-2.0.pre, on Mac OS X 10.15.3 19D76, locale zh-Hans-CN)
    • Flutter version 1.19.0-2.0.pre at /Users/sheldon/Documents/DevelopTools/flutter
    • Framework revision bfe6d2f4e6 (3 days ago), 2020-05-29 19:08:01 -0400
    • Engine revision 4d78121a11
    • Dart version 2.9.0 (build 2.9.0-11.0.dev 6489a0c68d)

I run it in a iOS12.0 simulator, here is the error message:

#0      initialize 
package:time_machine/…/platforms/vm.dart:60
#1      TimeMachine.initialize 
package:time_machine/time_machine.dart:100
#2      example 
package:zefyr_demo/main.dart:28
#3      main 
package:zefyr_demo/main.dart:19
#4      _runMainZoned.<anonymous closure>.<anonymous closure>  (dart:ui/hooks.dart:247:25)
#5      _rootRun  (dart:async/zone.dart:1190:13)
#6      _CustomZone.run  (dart:async/zone.dart:1093:19)
#7      _runZoned  (dart:async/zone.dart:1630:10)
#8      runZonedGuarded  (dart:async/zone.dart:1618:12)
#9      _runMainZoned.<anonymous closure>  (dart:ui/hooks.dart:239:5)
#10     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:301:19)
#11     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:168:12)```
@JonasWanke
Copy link
Contributor

@xiongdi9456 If you run the Flutter example, could you please change:

await TimeMachine.initialize({rootBundle: rootBundle})

to:

await TimeMachine.initialize({'rootBundle': rootBundle})

and tell me whether that fixes your problem? (The map key is now a string)

@JEuler
Copy link

JEuler commented Aug 6, 2020

It helped me

@polRk
Copy link
Contributor

polRk commented Sep 16, 2020

await TimeMachine.initialize(<String, dynamic>{'rootBundle': rootBundle});

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

Successfully merging a pull request may close this issue.

4 participants