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

[Windows]: Null Safety Migration tool 404 error #100134

Closed
iqfareez opened this issue Mar 15, 2022 · 12 comments
Closed

[Windows]: Null Safety Migration tool 404 error #100134

iqfareez opened this issue Mar 15, 2022 · 12 comments
Labels
a: null-safety Support for the Dart's team new null safety feature dependency: dart Dart team may need to help us e: OS-version specific Affects only some versions of the relevant operating system platform-windows Building on or for Windows specifically r: invalid Issue is closed as not valid tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@iqfareez
Copy link

iqfareez commented Mar 15, 2022

Error occurred when trying to migrate old Flutter project.

Steps to Reproduce

  1. Create a new Flutter project
flutter create migration_error
  1. Open pubspec.yaml and change the enviroment sdk to
sdk: ">=2.7.0 <3.0.0"

This is needed to disable null safety feature.
3. Make minor changes to main.dart
4. Run

dart migrate

Expected results:

Normal migration page

Actual results:

NNBD Migration Preview with 404 error.

image

Logs
Migrating D:\Iqmal\Documents\Flutter apps\Experiments\migration_error

See https://dart.dev/go/null-safety-migration for a migration guide.


Generating migration suggestions...
[--------------------------------------------------------------------------------------------------------------------]
Compiling instrumentation information...
[--------------------------------------------------------------------------------------------------------------------]
View the migration suggestions by visiting:
  http://127.0.0.1:61335/D:/Iqmal/Documents/Flutter%20apps/Experiments/migration_error?authToken=XE0nxcea0AQ%3D

Use this interactive web view to review, improve, or apply the results.
When finished with the preview, hit ctrl-c to terminate this process.

If you make edits outside of the web view (in your IDE), use the 'Rerun from
sources' action.
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version
    10.0.22000.556], locale en-MY)
    • Flutter version 2.10.3 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (13 days ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Iqmal\AppData\Local\Android\Sdk
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Iqmal\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.10)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual
      Studio\2019\Community
    • Visual Studio Community 2019 version 16.11.32126.315
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] IntelliJ IDEA Community Edition (version 2021.2)
    • IntelliJ at D:\Program Files\IntelliJ IDEA Community Edition 2021.2
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.4746.57

[√] VS Code, 64-bit edition (version 1.65.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.36.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version
      10.0.22000.556]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 99.0.4844.51
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 99.0.1150.39

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
@mattetti
Copy link

Quick workaround until there is a fix: edit the URL and change your Windows drive letter from d: to D: (from lowercase to uppercase), the tool doesn't seem to be able to load the repo if the drive letter is lowercase.

@iqfareez
Copy link
Author

That works! Cheers man. In the terminal it shows the correct D:, then why in the browser it changed to d:? 🤔

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Mar 16, 2022
@darshankawar
Copy link
Member

@iqfareez
I tried replicating the use case you reported, but was unable to see the error. I get below as expected after accessing the link generated:

mig

I verified this on same stack as you, ie, on Windows 10 and used latest stable 2.10.3.

The path is correctly captured by the tool, but not sure in your case, how did it get converted int lowercase d:

Do you consistently get the error everytime or was it one-off ?

I also see that you have space in your folder name D:\Iqmal\Documents\Flutter apps\Experiments\migration_errorD:\Iqmal\Documents\Flutter apps\Experiments\migration_error.

Can you remove the space and have FlutterApps instead and try again to see if the error still replicates ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 16, 2022
@iqfareez
Copy link
Author

Thank you for your reply.

Actually, I'm on Windows 11.

I tried your suggestion, and the problem still exists. However, I think it is the vscode terminal fault. I run dart migrate on standalone cmd, and the link can open correctly.

Can you confirm by try to run it on vscode integrated terminal?

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 16, 2022
@darshankawar
Copy link
Member

Thanks for the update. I don't use vscode so can't verify it.
Per your comment, since this is happening using vscode, I suggest you to open this issue in dedicated repo: https://github.com/Dart-Code/Dart-Code/issues and see what they say. I'll keep this issue open mean time.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 16, 2022
@mattetti
Copy link

For what it's worth, i did repro on Windows 11, Dart 2.16 and VSCode. I clicked the link from the powershell terminal after running dart migrate.

@darshankawar
Copy link
Member

Thanks for the feedback @mattetti. Although I don't have Windows 11, but I'll again try to replicate this using VSCode and check.

@iqfareez
Copy link
Author

I suggest you to open this issue in dedicated repo: https://github.com/Dart-Code/Dart-Code/issues and see what they say.

I don't think it is related to the plugin. Nevertheless, I've opened an issue in vscode microsoft/vscode#145195. Let's hear what they will say about it.

But, if the issue is not solved on vscode side, perhaps we can make the migration tools 'read' the lowercase drive letter.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 17, 2022
@darshankawar
Copy link
Member

I tried again on Windows 10 using VSCode and Dart 2.16 but have been unable to replicate this issue. The link I access gets opened properly as mentioned in my previous findings: #100134 (comment)

I am going ahead and labeling it for further investigation from the team. Per Reporters, they are seeing this on Windows 11.

@darshankawar darshankawar changed the title Null Safety Migration tool 404 error [Windows]: Null Safety Migration tool 404 error Mar 18, 2022
@darshankawar darshankawar added platform-windows Building on or for Windows specifically dependency: dart Dart team may need to help us a: null-safety Support for the Dart's team new null safety feature tool Affects the "flutter" command-line tool. See also t: labels. e: OS-version specific Affects only some versions of the relevant operating system and removed in triage Presently being triaged by the triage team labels Mar 18, 2022
@darshankawar
Copy link
Member

/cc @stuartmorgan

@stuartmorgan
Copy link
Contributor

Issues with the dart tool need to be filed against Dart, not Flutter.

@github-actions
Copy link

github-actions bot commented Apr 4, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: null-safety Support for the Dart's team new null safety feature dependency: dart Dart team may need to help us e: OS-version specific Affects only some versions of the relevant operating system platform-windows Building on or for Windows specifically r: invalid Issue is closed as not valid tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

4 participants