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 #33

Closed
ArtFlag opened this issue Dec 17, 2018 · 2 comments
Closed

Unhandled exception #33

ArtFlag opened this issue Dec 17, 2018 · 2 comments
Assignees

Comments

@ArtFlag
Copy link

ArtFlag commented Dec 17, 2018

Hi and thanks for this tool, it seems useful!

Env

  • MacOs Mojave
  • Dart and Linkcheck installed as recommended on the repo's readme.
  • Webserver started with npm http-server (if that matters)

Problem

I'm running a local webserver with 4 folders at the root, and my index file. I expect the whole server to contain around 10 broken link (tested with other tools).

When I check with linkcheck, I get the following output:

Crawling: 2Unhandled exception:
NoSuchMethodError: The getter 'primaryType' was called on null.
Receiver: null
Tried calling: primaryType
#0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1      DestinationResult.updateFromResponse (package:linkcheck/src/destination.dart:327:48)
#2      checkPage (package:linkcheck/src/worker/worker.dart:127:11)
<asynchronous suspension>
#3      worker.<anonymous closure> (package:linkcheck/src/worker/worker.dart:192:29)
<asynchronous suspension>
#4      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#5      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#6      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#7      _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#8      _StreamController._add (dart:async/stream_controller.dart:639:7)
#9      _StreamController.add (dart:async/stream_controller.dart:585:5)
#10     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#12     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#13     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#14     _StreamController._add (dart:async/stream_controller.dart:639:7)
#15     _StreamController.add (dart:async/stream_controller.dart:585:5)
#16     _StreamSinkWrapper.add (dart:async/stream_controller.dart:858:13)
#17     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#18     CastStreamSubscription._onData (dart:_internal/async_cast.dart:81:11)
#19     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#20     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#21     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#22     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#23     _StreamController._add (dart:async/stream_controller.dart:639:7)
#24     _StreamController.add (dart:async/stream_controller.dart:585:5)
#25     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
Unhandled exception:
NoSuchMethodError: The getter 'primaryType' was called on null.
Receiver: null
Tried calling: primaryType
#0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1      DestinationResult.updateFromResponse (package:linkcheck/src/destination.dart:327:48)
#2      checkPage (package:linkcheck/src/worker/worker.dart:127:11)
<asynchronous suspension>
#3      worker.<anonymous closure> (package:linkcheck/src/worker/worker.dart:192:29)
<asynchronous suspension>
#4      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#5      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#6      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#7      _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#8      _StreamController._add (dart:async/stream_controller.dart:639:7)
#9      _StreamController.add (dart:async/stream_controller.dart:585:5)
#10     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#12     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#13     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#14     _StreamController._add (dart:async/stream_controller.dart:639:7)
#15     _StreamController.add (dart:async/stream_controller.dart:585:5)
#16     _StreamSinkWrapper.add (dart:async/stream_controller.dart:858:13)
#17     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#18     CastStreamSubscription._onData (dart:_internal/async_cast.dart:81:11)
#19     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#20     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#21     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#22     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#23     _StreamController._add (dart:async/stream_controller.dart:639:7)
#24     _StreamController.add (dart:async/stream_controller.dart:585:5)
#25     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
(repeat the same exception)

But the CLI still runs! After waiting a couple of minutes, I get :

Errors. Checked 4892 links, 161 destination URLs (82 ignored), 93 have errors, 0 have warnings.

Which is not correct, but... it runs.

Any idea?

@LucasGorgal
Copy link

Having the same err.

@filiph
Copy link
Owner

filiph commented May 27, 2019

Hi, sorry for not seeing this earlier. Could you please upgrade to latest (2.0.8) and try again? Please also use linkcheck --debug <url> and paste the whole output (or at least until the error). You might want to sanitize it in case you're crawling some secret/PII URLs - the debug output will have them all.

@filiph filiph self-assigned this May 27, 2019
@ArtFlag ArtFlag closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2024
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