Giter VIP home page Giter VIP logo

Comments (12)

darshankawar avatar darshankawar commented on June 27, 2024 1

Thanks for the report @jlewallen
Can you try this and see if it helps in your case or not ?

from flutter.

jlewallen avatar jlewallen commented on June 27, 2024

On my machine there is no ANGLE D3D11 renderer. I tried "SwiftRenderer" and the emulator didn't appear functional. I tried Desktop Native and that seemed to fix the issue. Thanks :)

Incidentally, my app was recently rejected because of a "clearing cache issue" and was hoping this was something related that would explain the problem, as I'm unable to reproduce the issue the reviewer saw. Was clearing the app cache a red herring in this case, do you think?

At any rate, things for getting my emulator working.

from flutter.

jlewallen avatar jlewallen commented on June 27, 2024

Actually, a correction. The example from the template works, but my app still exhibits the same behavior. Fortunately, my app is open source:

https://gitlab.com/fieldkit/patina/

I will start looking into how to make a smaller repro.

from flutter.

jlewallen avatar jlewallen commented on June 27, 2024

I was trying to reproduce with a narrower and narrower version of my app and ended up back where I started: the problem is happening again with the flutter create template. I've tried starting with a new emulator from scratch.

Apologies for the deluge of messages. I'll go silent until I have more useful information, just wanted to update with the knowledge that this is coming and going with a mind of its own and at first did seemed tied to rendering settings, but is not behaving consistently.

from flutter.

mohsen-mohamed avatar mohsen-mohamed commented on June 27, 2024

Thanks for the report @jlewallen Can you try this and see if it helps in your case or not ?

thank you for the reply it helped me a lot
I've been searching for a solution and finally found it in the link
simply changing that setting fixed it
and there is another solution in the same post by changing the emulator's config.ini
hw.gpu.enabled=yes
hw.gpu.mode=host
both solutions worked for me

from flutter.

darshankawar avatar darshankawar commented on June 27, 2024

the problem is happening again with the flutter create template. I've tried starting with a new emulator from scratch.

Apologies for the deluge of messages. I'll go silent until I have more useful information, just wanted to update with the knowledge that this is coming and going with a mind of its own and at first did seemed tied to rendering settings, but is not behaving consistently.

@jlewallen Is there a pattern that you can find that consistently replicates the behavior ? Try with different range of android emulators and check which one exhibits it, that'll help us to verify this further.

from flutter.

jlewallen avatar jlewallen commented on June 27, 2024

Right now it's 100% consistent for me, I'm very confused as to why it worked once and then reverted back to the original behavior. To help with reproducibility, I'm using this script to create and run the emulator:

#!/bin/bash

avdmanager delete avd -n p5 || true

avdmanager create avd -n p5 --package "system-images;android-33;google_apis;x86_64" --abi google_apis/x86_64  --device pixel_5 --force

sed -i -e '/hw\.gpu\.enabled/ s/=.*/=yes/' ~/.android/avd/p5.avd/config.ini
sed -i -e '/hw\.gpu\.mode/ s/=.*/=host/' ~/.android/avd/p5.avd/config.ini

pushd ~/tools/android-sdk/emulator
emulator -avd p5 -gpu host
popd

I've also upgraded to Flutter 3.22.1 and am creating my example using the same approach as before.

I narrowed down those "Advanced" settings to ~/.config/Android Open Source Project/Emulator.conf which has:

[set]
autoFindAdb=true
clipboardSharing=true
crashReportPreference=2
disableMouseWheel=false
disablePinchToZoom=false
glesApiLevelPreference=1
glesBackendPreference=4

Corresponding to Desktop native OpenGL and Renderer maximum.

from flutter.

jlewallen avatar jlewallen commented on June 27, 2024

Some new behavior, when I re-run the app using flutter run I get OpenGL errors:

Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...                           2,595ms
✓ Built build/app/outputs/flutter-apk/app-debug.apk
Syncing files to device sdk gphone64 x86 64...                      63ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on sdk gphone64 x86 64 is available at: http://127.0.0.1:41899/4mPGQ6Diqd4=/
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
E/emuglGLESv2_enc( 5100): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
The Flutter DevTools debugger and profiler on sdk gphone64 x86 64 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:41899/4mPGQ6Diqd4=/

This also happens if I select the "Compatibility" OpenGL API level.

from flutter.

melihhakanpektas avatar melihhakanpektas commented on June 27, 2024
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Connecting to VM Service at ws://127.0.0.1:50901/O0AILUsGstQ=/ws
D/CompatibilityChangeReporter( 8857): Compat change id reported: 183155436; UID 10175; state: ENABLED
I/FirebaseApp( 8857): Device unlocked: initializing all Firebase APIs for app [DEFAULT]
D/CompatibilityChangeReporter( 8857): Compat change id reported: 3400644; UID 10175; state: ENABLED
I/flutter ( 8857): !!BLOC!! StateChangedToUnauthenticatedEvent
I/flutter ( 8857): !!BLOC!! From AuthLoadingState to UnauthenticatedState
17
E/emuglGLESv2_enc( 8857): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22631.3672], locale tr-TR)
    • Flutter version 3.22.1 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (12 days ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\melih\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)
    • All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33723.286
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2023.3)
    • 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 17.0.10+0--11572160)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\melih\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.90.0

[√] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 14 (API 34) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.22631.3672]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 119.0.6045.160
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 125.0.2535.79

[√] Network resources
    • All expected network resources are available.

• No issues found!

from flutter.

darshankawar avatar darshankawar commented on June 27, 2024

Thanks for the update. I am unable to replicate this using latest stable and by creating a new Android emulator Pixel 5 for example in which the app builds and compiles all UI elements properly.

@jlewallen The emulator you create, does it have play store feature ?

Screenshot 2024-06-04 at 11 26 46 AM

And this behavior is only occuring on emulators and not on physical devices ?

from flutter.

jlewallen avatar jlewallen commented on June 27, 2024

Hey there @darshankawar ,

Yes, I tried creating a new emulator with play store enabled and the problem persists, regardless of the OpenGL settings. Here are the AVDs I'm trying with:

 avdmanager list avd
Available Android Virtual Devices:
    Name: p4
  Device: pixel_4 (Google)
    Path: /home/jlewallen/.android/avd/p4.avd
  Target: Google Play (Google Inc.)
          Based on: Android VanillaIceCream Preview Tag/ABI: google_apis_playstore/x86_64
    Skin: pixel_4
  Sdcard: 512M
---------
    Name: p5
  Device: pixel_5 (Google)
    Path: /home/jlewallen/.android/avd/p5.avd
  Target: Google Play (Google Inc.)
          Based on: Android VanillaIceCream Preview Tag/ABI: google_apis_playstore/x86_64
  Sdcard: 512 MB

As far as if I'm seeing it on physical devices, that's harder for me to answer. My Pixel 5 doesn't reproduce the issue nor does an older Android device I have. I've had 1 user report a similar issue on a Pixel 7, in that they had to clear the "app data" in order to get the app to launch, but it doesn't seem like the problem "came back" on successive launches as it does with the emulator. I also had my app rejected because the reviewer received the Android dialog about the app "having a bug" and suggesting the cache be cleared. I can't be positive that these two instances are the same issue, nor do I even know if app store reviews use physical devices.

Right now, other apps work fine in the emulator and assuming that this is the emulator's fault and not something specific to the framework feels risky, giving my experience with the app store.

I would love to have more background/understanding on the details of the issue if you have the time and know more? For example, do you know what's actually in the app's cache that could be affecting this? I've looked for programmatic ways to clear this particular cache, but couldn't find anything. I'm happy to dig deeper into the problem, I'm just not sure where Flutter ends and the emulator begins in the context of this issue.

Thanks!

from flutter.

darshankawar avatar darshankawar commented on June 27, 2024

Thanks for the update. I am not sure if Linux could be factor. Keeping the issue open and labeling for team's attention.

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.