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

Unhandled exception, due to packageRoot returning null instead of empty string #6

Open
sebe opened this issue Jan 30, 2016 · 3 comments

Comments

@sebe
Copy link

sebe commented Jan 30, 2016

Hi, the dart sdk v1.14.0 returns a Null now instead of empty string, for packageRoot.
I just updated my local copy of standalone.dart to test for null first and it work fine now.
if (packageRoot != null && packageRoot.isNotEmpty && p.startsWith(_packagesPrefix)) {

Next time someone does an update, maybe they could look at this.

api details
++++++++++++
change from
https://api.dartlang.org/1.13.2/dart-io/Platform/packageRoot.html
If there is no --package-root flag, then the empty string is returned.
to
https://api.dartlang.org/1.14.0/dart-io/Platform/packageRoot.html
If there is no --package-root flag, then null is returned.

Error details
+++++++++++++++++
Unhandled exception:
The null object does not have a getter 'isNotEmpty'.

NoSuchMethodError: method not found: 'isNotEmpty'
Receiver: null
Arguments: []
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 _loadAsBytes (package:timezone/standalone.dart:48:21)
#3 initializeTimeZone (package:timezone/standalone.dart:95:10)
#4 main (file:///home/pi/time_dart14/main.dart:5:4)
#5 _startIsolate. (dart:isolate-patch/isolate_patch.dart:261)
#6 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

@localvoid
Copy link
Owner

This package is now maintained by Sam Rawlins,
main repo is here: https://github.com/srawlins/timezone

@sebe
Copy link
Author

sebe commented Jan 30, 2016

Thanks Boris,

Hey @srawlins I can't create an issue against your fork, next time you do some work could you look at this issue.
Thanks

@srawlins
Copy link

Oops, thanks @sebe for letting me know! Copied to srawlins#2

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

3 participants