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

dcli throws exceptions in all of its commands!. #171

Closed
AdnanAlshami opened this issue Nov 19, 2021 · 9 comments
Closed

dcli throws exceptions in all of its commands!. #171

AdnanAlshami opened this issue Nov 19, 2021 · 9 comments

Comments

@AdnanAlshami
Copy link
Contributor

Describe the bug
dcli throws exceptions in all of its commands!.

To Reproduce
in command line:
dart pub global activate dcli
dcli doctor

Logs
here's the dcli doctor for example

C:\Windows\System32>dcli doctor
DCli version      1.12.4

OS                windows
OS version        "Windows 10 Pro" 10.0 (Build 19043)
path separator    \

dart version      2.14.0

dcli path         C:\Users\MY_USER_NAME\AppData\Local\Pub\Cache\bin\dcli.bat
dart exe path     C:\usr\bin\dart
_CastError: Null check operator used on a null value
Stacktrace: doctor.dart : DoctorCommand._printExePaths : 135
doctor.dart : DoctorCommand.run : 43
command_line_runner.dart : CommandLineRunner.process : 87
entry_point.dart : EntryPoint._parseCmdLine : 37
entry_point.dart : EntryPoint.process : 32
dcli.dart : DCli.run : 13
dcli.dart : main : 8
isolate_patch.dart : _delayEntrypointInvocation.<anonymous closure> : 281
isolate_patch.dart : _RawReceivePortImpl._handleMessage : 184

Additional context
I'm using the embedded version of dart that comes with flutter 2.5.0

@bsutton
Copy link
Collaborator

bsutton commented Nov 20, 2021 via email

@AdnanAlshami
Copy link
Contributor Author

Thank you for your reply.

I've upgraded my flutter/dart to the latest version, and I've successfully installed dcli 1.13.1.

this is the output of the dcli doctor command

DCli version      1.13.1

OS                windows
OS version        "Windows 10 Pro" 10.0 (Build 19043)
path separator    \

dart version      2.14.4

dcli path         C:\Users\USR\AppData\Local\Pub\Cache\bin\dcli.bat
dart exe path     C:\usr\bin\dart
dart path         C:\usr\bin\dart                                         which: C:\Users\USR\not found               
compiler          using 'dart compile exe'

pub               using 'dart pub'

pub cache         C:\Users\USR\AppData\Local\Pub\Cache
PUB_CACHE Env     false

package config    C:\Users\USR\not passed

PATH
                  C:\Program Files\Zulu\zulu-15\bin
                  C:\Windows\system32
                  C:\Windows
                  C:\Windows\System32\Wbem
                  C:\Windows\System32\WindowsPowerShell\v1.0
                  C:\Windows\System32\OpenSSH
                  C:\Program Files\Git\cmd
                  C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
                  C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
                  C:\wamp64\bin\php\php7.3.21
                  C:\ProgramData\ComposerSetup\bin
                  C:\Program Files\nodejs
                  C:\Users\USR\AppData\Local\Programs\Python\Python38-3
                  C:\Users\USR\AppData\Local\Programs\Python\Python38-3
                  C:\Users\USR\AppData\Local\Microsoft\WindowsApps
                  C:\Users\USR\AppData\Local\Programs\Microsoft VS Code
                  D:\flutter\bin
                  C:\Program Files\Android\Android Studio\jre\bin
                  C:\<HOME>\Composer\vendor\bin
                  C:\<HOME>\npm
                  C:\Users\USR\AppData\Local\Pub\Cache\bin
                  C:\Users\USR\AppData\Local\GitHubDesktop\bin

Shell Settings
$SHELL
detected          cmd.exe
Start sript       not supported by shell

dart location(s)
                  D:\flutter\bin\dart

permissions
HOME              rwxrwxrwx <user>:<user> C:\<HOME>
.dcli             C:\<HOME>\.dcli does not exist
templates         C:\<HOME>\.dcli\templates does not exist
pub cache         rwxrwxrwx <user>:<user> C:\Users\USR\AppData\Local\Pub\Cache

but when I run dcli install in order to complete the installation process, I get this error:

Unhandled exception:
FormatException: Missing extension byte (at offset 1281)
#0      _Utf8Decoder.convertChunked (dart:convert-patch/convert_patch.dart:1892:7)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:314:28)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#5      _RootZone.runUnaryGuarded (dart:async/zone.dart:1620:10)
#6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)
#9      _StreamController._add (dart:async/stream_controller.dart:607:7)
#10     _StreamController.add (dart:async/stream_controller.dart:554:5)
#11     _Socket._onData (dart:io-patch/socket_patch.dart:2166:41)
#12     _RootZone.runUnaryGuarded (dart:async/zone.dart:1620:10)
#13     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#14     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#15     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)
#16     _StreamController._add (dart:async/stream_controller.dart:607:7)
#17     _StreamController.add (dart:async/stream_controller.dart:554:5)
#18     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1702:33)
#19     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1213:14)
#20     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#22     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)
#23     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)
#24     _waitForEvent (dart:cli-patch/cli_patch.dart:8:64)
#25     _WaitForUtils.waitForEvent (dart:cli/wait_for.dart:64:12)
#26     waitFor (dart:cli/wait_for.dart:141:19)
#27     waitForEx (package:dcli/src/util/wait_for_ex.dart:26:13)
#28     RunnableProcess.processUntilExit (package:dcli/src/util/runnable_process.dart:459:7)
#29     RunnableProcess.run (package:dcli/src/util/runnable_process.dart:179:11)
#30     start (package:dcli/src/functions/run.dart:249:19)
#31     StringAsProcess.toList (package:dcli/src/util/string_as_process.dart:308:22)
#32     ProcessHelper._windowsParentProcessList (package:dcli/src/util/process_helper.dart:133:14)
#33     ProcessHelper._windowsGetParentPid (package:dcli/src/util/process_helper.dart:118:21)
#34     ProcessHelper.getParentPID (package:dcli/src/util/process_helper.dart:64:14)
#35     ShellDetection._searchProcessTree (package:dcli/src/shell/shell_detection.dart:82:43)
#36     ShellDetection.identifyShell (package:dcli/src/shell/shell_detection.dart:68:14)
#37     Shell.current (package:dcli/src/shell/shell.dart:228:61)
#38     InstallCommand.run (package:dcli/src/script/commands/install.dart:41:25)
#39     CommandLineRunner.process (package:dcli/src/script/command_line_runner.dart:86:27)
#40     EntryPoint._parseCmdLine (package:dcli/src/script/entry_point.dart:35:38)
#41     EntryPoint.process (package:dcli/src/script/entry_point.dart:30:7)
#42     DCli.run (file:///C:/Users/USR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcli-1.13.1/bin/dcli.dart:13:35)
#43     main (file:///C:/Users/USR/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcli-1.13.1/bin/dcli.dart:8:10)
#44     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
#45     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

I've tried both windows command line and Bash, I tried the power shell, but it sounds that I have another problem there.

@bsutton
Copy link
Collaborator

bsutton commented Nov 20, 2021 via email

@bsutton
Copy link
Collaborator

bsutton commented Nov 21, 2021 via email

@AdnanAlshami
Copy link
Contributor Author

Can you also run this program:

I ran this and everything is ok, it prints a lot of paths and integers, no exceptions happened.
I've noticed only one strange line \\?\C:\Windows\system32\conhost.exe
as you can see, it has some extra characters in front of the line.
other than that, everything is fine.
Thank you.

@bsutton
Copy link
Collaborator

bsutton commented Nov 21, 2021 via email

@AdnanAlshami
Copy link
Contributor Author

Did you solve the issue?

On Sun, 21 Nov 2021, 4:21 pm AdnanAlshami, @.***> wrote: Closed #171 <#171>. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#171 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG32OF7MQAKONMCYEBXBATUNB6U7ANCNFSM5IM7ZDMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Yes. Thanks a lot.

@bsutton
Copy link
Collaborator

bsutton commented Nov 21, 2021 via email

@AdnanAlshami
Copy link
Contributor Author

To help others can you provide so info on what you did to solve it?

Just upgraded the flutter/dart SDK to the latest version, then deactivate the previously installed dcli, and reinstall the latest one 1.13.1.

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