Skip to content

404 on network_service.mojom.dart, url_loader.mojom.dart and service_registry.mojom.dart #27

Description

@aghassemi

When I try to run a Hello World Sky app on Android, I only get a black screen. Looking at logs, I see it can't find bunch of files:

27.0.0.1 - - [05/Jul/2015 08:33:41] code 404, message File not found
127.0.0.1 - - [05/Jul/2015 08:33:41] "GET /packages/mojom/mojo/network_service.mojom.dart HTTP/1.1" 404 -
127.0.0.1 - - [05/Jul/2015 08:33:41] code 404, message File not found
127.0.0.1 - - [05/Jul/2015 08:33:41] "GET /packages/mojom/mojo/url_loader.mojom.dart HTTP/1.1" 404 -
127.0.0.1 - - [05/Jul/2015 08:33:41] code 404, message File not found
127.0.0.1 - - [05/Jul/2015 08:33:41] "GET /packages/mojom/mojo/service_registry.mojom.dart HTTP/1.1" 404 -

What I am doing is just creating a simple main.dart in a folder with a pubspec.yaml that looks like:

name: your_app_name
dependencies:
  sky: any

and doing a pub get and ./packages/sky/sky_tool start

pub get seems to be getting the latests versions(0.13)

Resolving dependencies... (1.2s) 
+ args 0.13.2
+ mojo 0.0.13
+ mojom 0.0.13
+ path 1.3.5
+ sky 0.0.13
+ vector_math 1.4.3

I have also tried uninstalling SkyDemo and running with ./packages/sky/sky_tool start --install, but same issue.

Activity

  1. eseidel commented on Jul 6, 2015

    @eseidel
    Contributor

    It sounds like pub run sky:init wasn't run (which calls pub run momom:generate). ./packages/sky/sky_tool should do that for you however.

    I can attempt to reproduce when I'm in the office. I suspect I failed to publish the latest Sky package correctly. @johnmccutchan

  2. johnmccutchan commented on Jul 6, 2015

    @johnmccutchan
    Contributor

    On a clean sky_test project:

    $ ./packages/sky/sky_tool start
    Dart VM version: 1.11.1 (Thu Jul 2 05:10:33 2015) on "macos_x64"
    error: device not found
    /Users/johnmccutchan/workspace/sky_test/main.dart does not exist.

    $ touch main.dart
    $ ./packages/sky/sky_tool start
    Dart VM version: 1.11.1 (Thu Jul 2 05:10:33 2015) on "macos_x64"
    error: device not found
    error: device not found
    Traceback (most recent call last):
    File "./packages/sky/sky_tool", line 310, in
    SkyShellRunner().main()
    File "./packages/sky/sky_tool", line 303, in main
    exit_code = args.func(args, pids)
    File "./packages/sky/sky_tool", line 160, in run
    if not self._is_package_installed(ANDROID_PACKAGE):
    File "./packages/sky/sky_tool", line 127, in _is_package_installed
    return subprocess.check_output(pm_path_cmd).strip() != ''
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['adb', 'shell', 'pm', 'path', 'org.domokit.sky.demo']' returned non-zero exit status 255

    After attaching a device I see what's going on.

  3. johnmccutchan commented on Jul 6, 2015

    @johnmccutchan
    Contributor
  4. johnmccutchan commented on Jul 6, 2015

    @johnmccutchan
    Contributor

    @aghassemi Until the next revision of the Sky SDK a work around is:

    1. Depend on 'mojo_services' explicitly in your application.
    2. Run pub get
    3. Stop and start sky_tool
  5. aghassemi commented on Jul 6, 2015

    @aghassemi
    ContributorAuthor

    Thanks @johnmccutchan Workaround fixed the 404s.

    I still get a black screen on the Hello World example but that should not be related to this issue. I get the black screen on a fresh install of the SkyDemo from the App store too. (Nexus 7, Android 5.1.1), any thoughts on where to look for the root cause?

  6. eseidelGoogle commented on Jul 6, 2015

    @eseidelGoogle
    Contributor

    It probably is black text on a black background. When we moved from the old world (.sky) to the new world (.dart) we changed the default background color from white to black to avoid the flash-of-white problem that the Web had for years during the load of pages.

    I suspect we need to update hello_world to set a text color:

    https://github.com/domokit/mojo/tree/master/sky/sdk/example/hello_world

  7. iansf commented on Jul 6, 2015

    @iansf
    Contributor

    I think that we changed the default text color to white last week. In the current world, though, hello_world draws its text under the status bar, which can make it hard to notice. Do you see that text when you run hello_world on your device?

  8. aghassemi commented on Jul 7, 2015

    @aghassemi
    ContributorAuthor

    @eseidel @iansf Thanks for the hints. It was both a black-on-black and under-the-statusbar issue. Putting it in a container with light background, I can see the text just fine now. ( I was creating my own hello world based on the code in README rather than trying the examples/hello_world so the text is still black )

  9. 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.

  10. 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions