dart-gde/chrome.dart

Error running app/demo

d2m opened this issue · 2 comments

d2m commented

Dart Editor version 1.2.0.dev_05_15 (DEV)
Running app/demo/manifest.json with 'Run as Chrome App'.
Also added a pubspec.yaml (browser, chrome), without success.

Failed to load resource: net::ERR_FILE_NOT_FOUND
  chrome-extension://ocafhailekckbkmaofgpgnjmigjjjhpf/packages/browser/interop.js
Failed to load resource: net::ERR_FILE_NOT_FOUND
  chrome-extension://ocafhailekckbkmaofgpgnjmigjjjhpf/packages/chrome/bootstrap.js
An error occurred loading file: package:chrome/chrome_app.dart
Failed to load resource: net::ERR_FILE_NOT_FOUND
  chrome-extension://ocafhailekckbkmaofgpgnjmigjjjhpf/packages/chrome/chrome_app.dart
d2m commented

Must be a problem with symlinks and the way the app is created in the editor.
Replacing the symlinks under packages with real files and installing via 'Load unpackaged extension' the demo app worked.

d2m commented

How it works from inside the Dart editor:

  • add pubspec.yaml (with browser, chrome)
  • pub build
  • switch to build/web
  • edit demo.html, replace
    <script src="demo.dart" type="application/dart"></script>
    with
    <script src="demo.dart.precompiled.js"></script>
  • Right-Click manifest.json, select 'Run as Chrome App'