Repository navigation
Hello world didn't work on Samsung S5 #267
Description
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
FlutterIssues commentedon Nov 9, 2015
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...
FlutterIssues commentedon Nov 9, 2015
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
FlutterIssues commentedon Nov 9, 2015
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
FlutterIssues commentedon Nov 9, 2015
Friday Nov 06, 2015 at 19:17 GMT
@luan-cestari You could try putting a print statement in your main function
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.
FlutterIssues commentedon Nov 9, 2015
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
FlutterIssues commentedon Nov 9, 2015
Friday Nov 06, 2015 at 19:44 GMT
The
dev.flxis the file that contains all your code. It looks like we're failing to open that file for some reason. What doesadb shell ls /data/data/org.domokit.sky.shell/dev.flxsay?FlutterIssues commentedon Nov 9, 2015
Friday Nov 06, 2015 at 19:59 GMT
The file isn't there:
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:
FlutterIssues commentedon Nov 9, 2015
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 unknownThat'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.flxcan succeed.It might be worth trying
adb install -r packages/sky_tools/cache/sky_engine/bc1953b81099ad9d14789daa9b6c3426a4278dd3/Release/android-arm/SkyShell.apkmanually to reinstall the APK and then seeing if you can useadb shell run-as org.domokit.sky.shell ...to run commands as SkyShell.FlutterIssues commentedon Nov 9, 2015
Friday Nov 06, 2015 at 20:29 GMT
It didn't work =/
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 =/
FlutterIssues commentedon Nov 9, 2015
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.
FlutterIssues commentedon Nov 9, 2015
Friday Nov 06, 2015 at 21:24 GMT
I'm not sure why it thinks the
org.domokit.sky.shellpackage 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.FlutterIssues commentedon Nov 9, 2015
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.
4 remaining items
FlutterIssues commentedon Nov 9, 2015
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.
FlutterIssues commentedon Nov 9, 2015
Saturday Nov 07, 2015 at 10:13 GMT
See the flutter-dev mailing list where there's a workaround that worked for me. YMMV.
FlutterIssues commentedon Nov 9, 2015
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.
FlutterIssues commentedon Nov 9, 2015
Monday Nov 09, 2015 at 01:54 GMT
Great! 👍
FlutterIssues commentedon Nov 9, 2015
Monday Nov 09, 2015 at 15:55 GMT
Nice =) So in flutter 0.0.19 will have the fix , right? Thank you guys =D
Hixie commentedon Nov 10, 2015
(comment stream got truncated in migration, apologies)
luan-cestari commentedon Nov 11, 2015
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:
THank you in advance for the help =)
abarth commentedon Dec 5, 2015
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!
github-actions commentedon Sep 7, 2021
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 -vand a minimal reproduction of the issue.