Skip to content

Hello world didn't work on Samsung S5 #267

Closed

Description

@FlutterIssues

Issue by luan-cestari
Friday Nov 06, 2015 at 16:34 GMT
Originally opened as https://github.com/flutter/engine/issues/1988


Hi,

I downloaded project and build it (as I'm using Ubuntu 14.04 Kernel 3.13 x86_64) and tried to create the hello world application. It seems to work fine in my computer (no error in the terminal) but when I open the app in my phone it just shows a black screen. Below the output from the commands:
2015-11-06 13:13:21 ☆ |ruby-2.2.3| CI-40716-3-LNX in ~/Downloads/my_app
○ → flutter start --checked
Installing SkyShell.apk on device.

2015-11-06 13:17:18 ☆ |ruby-2.2.3| CI-40716-3-LNX in ~/Downloads/my_app
○ → flutter logs
android: --------- beginning of main
android: --------- beginning of system
android:
android: W/ActivityManager: getTasks: caller 10087 does not hold GET_TASKS; limiting output
android: W/ActivityManager: getTasks: caller 10087 does not hold GET_TASKS; limiting output
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android:
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: W/ActivityManager: Scheduling restart of crashed service flipboard.app/flipboard.remoteservice.MessengerService in 1000ms
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: I/chromium: [INFO:library_loader_hooks.cc(118)] Chromium logging enabled: level = 0, default verbosity = 0
android: E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
android: I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
android: I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: W/ActivityManager: getTasks: caller 10087 does not hold GET_TASKS; limiting output
android: W/ActivityManager: getTasks: caller 10087 does not hold GET_TASKS; limiting output
android: W/ActivityManager: getTasks: caller 10087 does not hold GET_TASKS; limiting output
android: W/ActivityManager: getTasks: caller 10087 does not hold GET_TASKS; limiting output
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: W/ActivityManager: Scheduling restart of crashed service tv.peel.smartremote/tv.peel.samsung.widget.service.WidgetTimerService in 1000ms
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: W/ActivityManager: Scheduling restart of crashed service com.samsung.indexservice/com.samsung.index.indexservice.service.BroadcastProcessorService in 10809ms
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: I/chromium: [INFO:library_loader_hooks.cc(118)] Chromium logging enabled: level = 0, default verbosity = 0
android: E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
android: W/ActivityManager: mDVFSHelper.acquire()
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: W/ActivityManager: mDVFSHelper.release()
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
android: E/ActivityManager: checkUser: useridlist=null, currentuser=0
...

Activity

  1. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by abarth
    Friday Nov 06, 2015 at 19:02 GMT


    Thanks for the report. We'll probably need to add more diagnostics to figure out what's going on...

  2. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by luan-cestari
    Friday Nov 06, 2015 at 19:12 GMT


    is there any thing that I could help to solve the issue?

    In http://flutter.io/getting-started/ mentioned that I could also use http://localhost:8181/ to get some debug information but the page generated seems broken, I got the following error from my js console:
    webcomponents.min.js:13 Uncaught TypeError: Math.random is not a function(anonymous function) @ webcomponents.min.js:13(anonymous function) @ webcomponents.min.js:13
    polymer.min.js:11 Uncaught TypeError: Cannot read property 'map' of undefined(anonymous function) @ polymer.min.js:11(anonymous function) @ polymer.min.js:11(anonymous function) @ polymer.min.js:11
    index.html.polymer.bootstrap.dart.js:179 Uncaught TypeError: Cannot read property 'split' of undefined

  3. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by devoncarew
    Friday Nov 06, 2015 at 19:16 GMT


    @luan-cestari, the web app there (Dart's Observatory) might need to be viewed in Chrome. cc'ing @johnmccutchan

  4. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by abarth
    Friday Nov 06, 2015 at 19:17 GMT


    @luan-cestari You could try putting a print statement in your main function

    void main() {
      print('hello');
    }

    If that shows up in the logs, that means you're getting all the way to code execution and there's something wrong on the graphics side.

  5. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by luan-cestari
    Friday Nov 06, 2015 at 19:39 GMT


    @abarth I changed to just ran that and after redirecting the output of flutter logs I saw that it failed to open a file and create a cache which seems to be used by gpu. I saved the logs in
    http://pastebin.com/6YWCmCqb but I think the meaningful lines are the following:

    android: E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
    android: E/chromium: [ERROR:data_pipe_file_utils.cc(233)] Opening file '/data/data/org.domokit.sky.shell/dev.flx' failed in CopyFromFileHandler::OpenFile

  6. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by abarth
    Friday Nov 06, 2015 at 19:44 GMT


    The dev.flx is the file that contains all your code. It looks like we're failing to open that file for some reason. What does adb shell ls /data/data/org.domokit.sky.shell/dev.flx say?

  7. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by luan-cestari
    Friday Nov 06, 2015 at 19:59 GMT


    The file isn't there:

    ○ →  adb shell ls /data/data/org.domokit.sky.shell/dev.flx
    /data/data/org.domokit.sky.shell/dev.flx: No such file or directory
    
    
    ○ →  adb shell ls /data/data/org.domokit.sky.shell/
    opendir failed, Permission denied
    
    
    ○ →  adb shell ls /data/data/org.domokit.sky.shell
    opendir failed, Permission denied
    

    The problem also occurs during the app installation but it wasn't logged with default "flutter start --checked" command, I got this with the following:

    ○ → flutter start --checked --very-verbose 
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb version
    Android Debug Bridge version 1.0.32
    Revision eac51f2bb6a8-android
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb start-server
    
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell echo ready
    ready
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell getprop ro.build.version.sdk
    21
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell pm path org.domokit.sky.shell
    package:/data/app/org.domokit.sky.shell-1/base.apk
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell cat /data/data/org.domokit.sky.shell/SkyShell.apk.sha1
    /system/bin/sh: cat: /data/data/org.domokit.sky.shell/SkyShell.apk.sha1: No such file or directory
    TODO(iansf): move this log to the caller. SkyShell.apk is out of date. Installing now...
    Installing SkyShell.apk on device.
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb install -r packages/sky_tools/cache/sky_engine/bc1953b81099ad9d14789daa9b6c3426a4278dd3/Release/android-arm/SkyShell.apk
    pkg: /data/local/tmp/SkyShell.apk
    Success
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell run-as org.domokit.sky.shell chmod 777 /data/data/org.domokit.sky.shell
    run-as: Package 'org.domokit.sky.shell' is unknown
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell echo -n 3fedc0f213e797ee19992cc16e2128cdd4e50991 > /data/data/org.domokit.sky.shell/SkyShell.apk.sha1
    /system/bin/sh: can't create /data/data/org.domokit.sky.shell/SkyShell.apk.sha1: Permission denied
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb reverse --remove tcp:9888
    Error code 1 returned when attempting to run command: /home/vrx_lcestari//android-sdk-linux/platform-tools/adb reverse --remove tcp:9888
    Errors logged: error: cannot remove listener
    
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell am force-stop org.domokit.sky.shell
    
    fuser -k 9888/tcp
    Error code 1 returned when attempting to run command: fuser -k 9888/tcp
    
    packages/sky_tools/cache/sky_engine/bc1953b81099ad9d14789daa9b6c3426a4278dd3/Release/linux-x64/sky_snapshot /home/vrx_lcestari/Downloads/my_app/./lib/main.dart --package-root=packages --snapshot=/tmp/flutter_tools1tUoFT/snapshot_blob.bin
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb forward tcp:8181 tcp:8181
    
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb push /tmp/flutter_tools1tUoFT/app.flx /data/local/tmp/dev.flx
    
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell mv /data/local/tmp/dev.flx /data/data/org.domokit.sky.shell/dev.flx
    mv: rename /data/local/tmp/dev.flx to /data/data/org.domokit.sky.shell/dev.flx: Permission denied
    /home/vrx_lcestari//android-sdk-linux/platform-tools/adb shell am start -a android.intent.action.RUN -d /data/data/org.domokit.sky.shell/dev.flx --ez enable-checked-mode true org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity
    Starting: Intent { act=android.intent.action.RUN dat=/data/data/org.domokit.sky.shell/dev.flx cmp=org.domokit.sky.shell/.SkyActivity (has extras) }
    
  8. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by abarth
    Friday Nov 06, 2015 at 20:05 GMT


    Interesting.

    adb shell run-as org.domokit.sky.shell chmod 777 /data/data/org.domokit.sky.shell run-as: Package 'org.domokit.sky.shell' is unknown

    That's the core of the problem. This command is intended to make the shell's directory writable so that adb shell mv /data/local/tmp/dev.flx /data/data/org.domokit.sky.shell/dev.flx can succeed.

    It might be worth trying adb install -r packages/sky_tools/cache/sky_engine/bc1953b81099ad9d14789daa9b6c3426a4278dd3/Release/android-arm/SkyShell.apk manually to reinstall the APK and then seeing if you can use adb shell run-as org.domokit.sky.shell ... to run commands as SkyShell.

  9. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by luan-cestari
    Friday Nov 06, 2015 at 20:29 GMT


    It didn't work =/

    ○ →  adb install -r packages/sky_tools/cache/sky_engine/bc1953b81099ad9d14789daa9b6c3426a4278dd3/Release/android-arm/SkyShell.apk
    6500 KB/s (7677647 bytes in 1.153s)
        pkg: /data/local/tmp/SkyShell.apk
    Success
    
    ○ → adb shell run-as org.domokit.sky.shell
    run-as: Package 'org.domokit.sky.shell' is unknown
    
    ○ →  adb shell ls /data/data/org.domokit.sky.shell/dev.flx
    /data/data/org.domokit.sky.shell/dev.flx: No such file or directory
    
    ○ →  adb shell ls /data/org.domokit.sky.shell/dev.flx
    /data/org.domokit.sky.shell/dev.flx: No such file or directory
    
    ○ →  adb shell ls /data/org.domokit.sky.shell/
    /data/org.domokit.sky.shell/: No such file or directory
    
    ○ →  adb shell ls /data/org.domokit.sky.shell
    /data/org.domokit.sky.shell: No such file or directory
    
    ○ →  adb shell ls /data/
    opendir failed, Permission denied
    
    ○ →  adb shell ls /data
    opendir failed, Permission denied
    
    ○ →  adb shell ls /data/data/org.domokit.sky.shell
    opendir failed, Permission denied
    
    ○ → adb shell run-as my_app
    run-as: Package 'my_app' is unknown
    
    

    I tried few more folders just trying to figure out where I had ACL to read (and its structure) but I got permission denied on all them. I also thought that maybe the app name generated was changed from demo or renamed, as the user doesn't exist from adb command output but I think we tried the reasonable possibilities (I can put the project into the github if you want to see the project, but it is the default demo app) . I got almost the same logs from flutter http://pastebin.com/g3R5aFLt

    Thank you for helping me =) I appreciate your help and I'm sorry to depending on you to do each next step but I'm not an expert on adb, android system and flutter =/

  10. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by MicroSpecWes
    Friday Nov 06, 2015 at 20:35 GMT


    I ran all the same commands on OSX 10.11.1 with the same results. I am also on the Samsung Galaxy S6 Edge.

  11. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by abarth
    Friday Nov 06, 2015 at 21:24 GMT


    I'm not sure why it thinks the org.domokit.sky.shell package is unknown... That should be the name of the SkyShell.apk package. I think the next step is for me to find an S5 or S6 and try experimenting with it locally. Thanks for helping debug the issue this far.

  12. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by jeffallen
    Saturday Nov 07, 2015 at 07:30 GMT


    IMHO, this page describes the problem: http://visualgdb.com/KB/?ProblemID=nopkg

    https://code.google.com/p/android/issues/detail?id=58373#c44 describes a workaround, have not tried it yet

    I suppose it will have to be good enough for sky_tools to detect this error message and stop with a pointer to issue 58373.

  13. 4 remaining items

  14. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by sasikiran
    Saturday Nov 07, 2015 at 10:06 GMT


    I have a Xiaomi phone running Android 5.1.1. The hello world app crashes on it too. When I install the app, I get to see the hello world label for just a second and after that it immediately crashes. Re-opening the app only shows a black screen. If I re-install the app, I again get to see the app for a second before it crashes.

  15. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by jeffallen
    Saturday Nov 07, 2015 at 10:13 GMT


    See the flutter-dev mailing list where there's a workaround that worked for me. YMMV.

  16. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by abarth
    Sunday Nov 08, 2015 at 16:52 GMT


    This issue should be fixed on master. I'll push a new release with the fix on Monday.

  17. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by thuytrinh
    Monday Nov 09, 2015 at 01:54 GMT


    Great! 👍

  18. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by luan-cestari
    Monday Nov 09, 2015 at 15:55 GMT


    Nice =) So in flutter 0.0.19 will have the fix , right? Thank you guys =D

  19. Hixie commented on Nov 10, 2015

    @Hixie
    Contributor

    (comment stream got truncated in migration, apologies)

  20. luan-cestari commented on Nov 11, 2015

    @luan-cestari

    Thanks @Hixie . I upgraded flutter to 0.0.18 , I notice in the process that some dependencies have some a newer version but couldn't be upgraded as they have other dependencies and those doesn't have the newer version available.

    I think that problem with hash and no ACL to write the app have been solved with the newer version but there still something wrong in the S5 generated app, in the logs mention something about GPU that might be the root cause. I paste the logs in the following gist (so it would be easier to comment something on the file as well) https://gist.github.com/luan-cestari/771cc153faf9f0b885a2

    The list of the dependencies that have a newer version:

    + fixnum 0.9.1+2 (0.10.2 available)
    + shelf_route 0.13.5 (0.14.0 available)
    + sky_engine 0.0.49 (0.0.50 available)
    + sky_services 0.0.50 (0.0.51 available)
    ...
    ○ → pub upgrade sky_services
    Resolving dependencies... (4.2s) 
    Package mojo_sdk has no versions that match 0.2.1 derived from:
    - sky_services 0.0.51 depends on version 0.2.1
    
    

    THank you in advance for the help =)

  21. abarth commented on Dec 5, 2015

    @abarth
    Contributor

    I believe the original issue reported here is fixed. If you're still having trouble with the S5, please open a new issue describing the problem. Thanks!

  22. github-actions commented on Sep 7, 2021

    @github-actions

    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.

  23. locked as resolved and limited conversation to collaborators on Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions