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

After upgrade to latest master, App fails to launch in Android Studio/IntelliJ #65456

Closed
D09r opened this issue Sep 9, 2020 · 24 comments
Closed
Labels
c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now customer: crowd Affects or could affect many people, though not necessarily a specific customer. d: intellij DevTools related - IntelliJ/flutter issues (most should be tracked in flutter/flutter-intellij) found in release: 1.22 Found to occur in 1.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on P0 Critical issues such as a build break or regression platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@D09r
Copy link

D09r commented Sep 9, 2020

After I did a flutter upgrade (Flutter 1.22.0-10.0.pre.107) earlier today caused this issue and thrown below error when ran the app either on an emulator or physical devices.

Error

Incompatible protocol version: client=3.26 vm=4.0
Failed to connect to the VM observatory service at: ws://127.0.0.1:63551/DPoP_jtt5ps=/ws
java.io.IOException: Incompatible protocol version: client=3.26 vm=4.0

Issue version

\>_ flutter --version
Flutter 1.22.0-10.0.pre.107 • channel master • https://github.com/flutter/flutter.git
Framework • revision 54ade88365 (2 hours ago) • 2020-09-08 22:08:57 -0700
Engine • revision d1d848e842
Tools • Dart 2.10.0 (build 2.10.0-98.0.dev)

Steps to reproduce

1. \>_ flutter upgrade
Upgrading Flutter from /Users/<user>/flutter...
Downloading Dart SDK from Flutter engine d1d848e8421e34e6b0c7fa05983a9ebeccf08544...
Building flutter tool...
2. \>_ flutter --version
Flutter 1.22.0-10.0.pre.107 • channel master • https://github.com/flutter/flutter.git
Framework • revision 54ade88365 (2 hours ago) • 2020-09-08 22:08:57 -0700
Engine • revision d1d848e842
Tools • Dart 2.10.0 (build 2.10.0-98.0.dev)
3. \>_ flutter doctor
No issues found!
4. \>_ flutter run
Running Xcode build...
Xcode build done.                                           41.4s
Waiting for iPhone 8 to report its views...
Debug service listening on ws://127.0.0.1..
..
Incompatible protocol version: client=3.26 vm=4.0
Failed to connect to the VM observatory service at: ws://127.0.0.1:63551/DPoP_jtt5ps=/ws
java.io.IOException: Incompatible protocol version: client=3.26 vm=4.0
4. Above error thrown when ran the app either on an emulator or physical device. 

Workaround

Downgraded the Flutter to 1.22.0-10.0.pre.89 and this issue has been resolved and the app ran on both emulator and physical device.

1. \>_ flutter downgrade
    Downgrade flutter to version 1.22.0-9.0.pre-89-g0bb1e573fc
    ? [y|n]: y
    Success
    Downloading Dart SDK from Flutter engine ac8b9c4c52ea55a73d37a17608d923137adcb3e8...
    Building flutter tool...
2. \>_ flutter --version
    Flutter 1.22.0-10.0.pre.89 • channel master • https://github.com/flutter/flutter.git
    Framework • revision 0bb1e573fc (19 hours ago) • 2020-09-08 15:28:13 +0200
    Engine • revision ac8b9c4c52
    Tools • Dart 2.10.0 (build 2.10.0-86.0.dev)
3. \>_ flutter run
    Launching lib/main.dart on iPhone 8 in debug mode...
 
    Running pod install...                                              4.0s
    Running Xcode build...                                                  
     └─Compiling, linking and signing...                        12.1s
    Xcode build done.                                           51.1s
    Waiting for iPhone 8 to report its views...                          4ms
    Syncing files to device iPhone 8...                                385ms

    Flutter run key commands.
    r Hot reload. 🔥🔥🔥
    R Hot restart.
    h Repeat this help message.
    d Detach (terminate "flutter run" but leave application running).
    c Clear the screen
    q Quit (terminate the application on the device).
    An Observatory debugger and profiler on iPhone 8 is available at: http://127.0.0.1:64943/7YFbDsWihMQ=/
@D09r D09r added the team-infra Owned by Infrastructure team label Sep 9, 2020
@TahaTesser TahaTesser removed the team-infra Owned by Infrastructure team label Sep 9, 2020
@TahaTesser
Copy link
Member

TahaTesser commented Sep 9, 2020

This is a regression on the latest master, only happens on Android Studio, no issues in VS Code or terminal
When running App, a white screen appears like a flash and the app fails to launch.

Issue is on Flutter (Channel master, 1.22.0-10.0.pre.109

logs
Launching lib/main.dart on RMX2001 in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Waiting for RMX2001 to report its views...
Debug service listening on ws://127.0.0.1:56102/OpU0efSlwMo=/ws
Syncing files to device RMX2001...
Incompatible protocol version: client=3.26 vm=4.0
Failed to connect to the VM observatory service at: ws://127.0.0.1:56102/OpU0efSlwMo=/ws
java.io.IOException: Incompatible protocol version: client=3.26 vm=4.0
flutter doctor -v
[✓] Flutter (Channel master, 1.22.0-10.0.pre.109, on Mac OS X 10.15.6 19G2021, locale en-GB)
    • Flutter version 1.22.0-10.0.pre.109 at /Users/tahatesser/Code/flutter_master
    • Framework revision e682ec711a (61 minutes ago), 2020-09-09 10:52:27 +0200
    • Engine revision d1d848e842
    • Dart version 2.10.0 (build 2.10.0-98.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.7, Build version 11E801a
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 49.0.4
    • Dart plugin version 202.7206

[✓] VS Code (version 1.48.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

 
[✓] Connected device (3 available)            
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 10 (API 29)
    • Web Server (web) • web-server       • web-javascript • Flutter Tools
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 85.0.4183.83

• No issues found!

No issue on Flutter (Channel master, 1.22.0-10.0.pre.88

logs
event sent after app closed: {id: 0, progressId: null, message: Running "flutter pub get" in master_flutter...}
event sent after app closed: {id: 0, progressId: null, finished: true}
Launching lib/main.dart on RMX2001 in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...
Waiting for RMX2001 to report its views...
Debug service listening on ws://127.0.0.1:56578/e2dlrrsLpR8=/ws
Syncing files to device RMX2001...
I/GED     (13624): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 27, oppidx_max 27, oppidx_min 0
I/.master_flutte(13624): ProcessProfilingInfo new_methods=441 is saved saved_to_disk=1 resolve_classes_delay=5000
I/SurfaceView(13624): 30673836 visibleChanged:true -> SurfaceHolder.Callback.surfaceDestroyed
D/Surface (13624): Surface::disconnect(this=0x76061f5000,api=1)
D/ViewRootImpl(13624): setSurfaceViewCreated, created:false
D/Surface (13624): Surface::disconnect(this=0x76061f5000,api=-1)
D/SurfaceView(13624): updateScreenMode w:0 h:0 ViewRoot w:1080 h:2400
D/SurfaceView(13624): try to resquest 90Hz
D/ViewRootImpl(13624): set screen refresh mode 0 due to SurfaceView-30673836
I/Choreographer(13624): Skipped 2 frames!  The application may be doing too much work on its main thread.
I/GED     (13624): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 27, oppidx_max 27, oppidx_min 0
D/Surface (13624): Surface::disconnect(this=0x76061f3000,api=1)
V/PhoneWindow(13624): DecorView setVisiblity: visibility = 4, Parent = android.view.ViewRootImpl@323255f, this = DecorView@636f780[MainActivity]
flutter doctor -v
[✓] Flutter (Channel master, 1.22.0-10.0.pre.88, on Mac OS X 10.15.6 19G2021,
    locale en-GB)
    • Flutter version 1.22.0-10.0.pre.88 at
      /Users/tahatesser/Code/flutter_master
    • Framework revision e10bdbbd9d (2 days ago), 2020-09-07 11:40:03 -0700
    • Engine revision ac8b9c4c52
    • Dart version 2.10.0 (build 2.10.0-86.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.7, Build version 11E801a
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.48.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

 
[✓] Connected device (3 available)            
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64  • Android 10 (API 29)
    • Web Server (web) • web-server       • web-javascript • Flutter Tools
    • Chrome (web)     • chrome           • web-javascript • Google Chrome
      85.0.4183.83

• No issues found!

@TahaTesser TahaTesser changed the title Failed to connect to the VM observatory service at: java.io.IOException: Incompatible protocol version: client=3.26 vm=4.0 After upgrade to latest master, getting Incompatible protocol version: client=3.26 vm=4.0 in Android Studio Sep 9, 2020
@TahaTesser TahaTesser added found in release: 1.22 Found to occur in 1.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-android Android applications specifically c: regression It was better in the past than it is now tool Affects the "flutter" command-line tool. See also t: labels. c: fatal crash Crashes that terminate the process labels Sep 9, 2020
@TahaTesser TahaTesser changed the title After upgrade to latest master, getting Incompatible protocol version: client=3.26 vm=4.0 in Android Studio After upgrade to latest master, App fails to launch in Android Studio/IntelliJ Sep 9, 2020
@TahaTesser TahaTesser added d: intellij DevTools related - IntelliJ/flutter issues (most should be tracked in flutter/flutter-intellij) P0 Critical issues such as a build break or regression labels Sep 9, 2020
@Abhishek0116
Copy link

This is a regression on the latest master, only happens on Android Studio, not VSC or terminal
When running App, a white screen appears like a flash and the app fails to launch.

Flutter (Channel master, 1.22.0-10.0.pre.109

logs
flutter doctor -v

Flutter (Channel master, 1.22.0-10.0.pre.88

logs
flutter doctor -v

You are right I faced the same issue and I tried in Visual Studio and working perfectly but I primarily use Android Studio for development and there was an issue that exists. Any other solution?

@TahaTesser
Copy link
Member

@Abhishek0116
You can execute flutter downgrade and type y to downgrade to the previous master version Flutter (Channel master, 1.22.0-10.0.pre.88, it should work. I tried it multiple times to make sure.

@Ayushd70
Copy link

Ayushd70 commented Sep 9, 2020

Facing the same issue here:

Syncing files to device sdk gphone x86 arm...
Incompatible protocol version: client=3.26 vm=4.0
Failed to connect to the VM observatory service at: ws://127.0.0.1:40207/Ps6R-OeUYt8=/ws
java.io.IOException: Incompatible protocol version: client=3.26 vm=4.0

@PedroFerraresi
Copy link

PedroFerraresi commented Sep 9, 2020

I'm facing the same problem here:

Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Waiting for AOSP on IA Emulator to report its views...
Debug service listening on ws://127.0.0.1:50441/Ln6FaCqUm_Q=/ws
Syncing files to device AOSP on IA Emulator...
Incompatible protocol version: client=3.26 vm=4.0
Failed to connect to the VM observatory service at: ws://127.0.0.1:50441/Ln6FaCqUm_Q=/ws
java.io.IOException: Incompatible protocol version: client=3.26 vm=4.0

@devoncarew
Copy link
Member

Thanks for the reports! This will be addressed by https://dart-review.googlesource.com/c/sdk/+/162240.

@kf6gpe
Copy link
Contributor

kf6gpe commented Sep 9, 2020

This is believed to be related to or the same as the upstream bug https://buganizer.corp.google.com/issues/168108577, too.

@tvolkert
Copy link
Contributor

tvolkert commented Sep 9, 2020

@pcsosinski FYI (we need to make sure not to cut a branch that contains this issue).

@pcsosinski
Copy link

pcsosinski commented Sep 9, 2020

ack there is more than one

@xkeyC
Copy link

xkeyC commented Sep 10, 2020

I also encountered the same problem.

@shjman
Copy link

shjman commented Sep 10, 2020

i wrote in console
"flutter channel stable"
and switched to [√] Flutter (Channel stable, v1.17.4, on Microsoft Windows [Version 6.3.9600], locale ru-RU)
and this is like a workaround

@nbinding-cie
Copy link

@Abhishek0116
You can execute flutter downgrade and type y to downgrade to the previous master version Flutter (Channel master, 1.22.0-10.0.pre.88, it should work. I tried it multiple times to make sure.

Unfortunately I am getting:

There is no previously recorded version for channel "master". Channel "stable" was previously on: 1.17.5

@xkeyC
Copy link

xkeyC commented Sep 10, 2020

Unfortunately I am getting:

There is no previously recorded version for channel "master". Channel "stable" was previously on: 1.17.5

Yes, I also met, I temporarily switched back to stable

@TahaTesser
Copy link
Member

@nbinding-cie
flutter downgrade downgrade to the previous version in your own tool history. If you had an older master version installed, you can downgrade to that. In your case, It might be stable

@nbinding-cie
Copy link

nbinding-cie commented Sep 10, 2020

@nbinding-cie
flutter downgrade downgrade to the previous version in your own tool history. If you had an older master version installed, you can downgrade to that. In your case, It might be stable

Thanks, I am trying that for now but encountering some other indirect issues when running my dart project after switching :(

Error: The specified language version is too high. The highest supported language version is 2.9

@TahaTesser
Copy link
Member

TahaTesser commented Sep 10, 2020

@nbinding-cie
Please try this
flutter channel stable
flutter upgrade --force
flutter doctor -v

@nbinding-cie
Copy link

@nbinding-cie
Please try this
flutter channel stable
flutter upgrade --force
flutter doctor -v

No issues found!

@Ayushd70
Copy link

@nbinding-cie
Please try this
flutter channel stable
flutter upgrade --force
flutter doctor -v

No issues found!

I had the same thing, what I did was to first downgarde and then close and reopen the flutter project. Seems fine now

@nbinding-cie
Copy link

@nbinding-cie
Please try this
flutter channel stable
flutter upgrade --force
flutter doctor -v

No issues found!

I had the same thing, what I did was to first downgarde and then close and reopen the flutter project. Seems fine now

Yup, being too impatient - all ok for now, thanks @Ayushd70 and @TahaTesser

@crtl
Copy link

crtl commented Sep 10, 2020

flutter downgrade solved it for me.

@tvolkert
Copy link
Contributor

The fix rolled into the Flutter engine in flutter/engine#21054 and is currently pending a framework roll.

@tvolkert
Copy link
Contributor

The fix rolled into flutter/flutter at 1b46023

@devoncarew can you confirm that it's fixed at ToT?

@devoncarew
Copy link
Member

Yup, this is now working on master.

@github-actions
Copy link

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 Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now customer: crowd Affects or could affect many people, though not necessarily a specific customer. d: intellij DevTools related - IntelliJ/flutter issues (most should be tracked in flutter/flutter-intellij) found in release: 1.22 Found to occur in 1.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on P0 Critical issues such as a build break or regression platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests