Chrome app store porting from Android app using arc welder

馋奶兔 提交于 2019-12-30 14:48:12

问题


This question is relevant to app developers only!

I am trying to convert and publish my android apps to chrome web store. I used the arc welder chrome app suggested in Google's getting started guide. I've downloaded zip from ARC welder app. When I launch the app from welder app, It's working as expected.

The issue 1 (solved): After publishing the zip file on Chrome app store and trying to install on Chrome running on OSX platform the app appear "Unsupported platform" and does not allow to install. I installed ChromiumOS on virtual machine and the app appears compatible. When trying to install it, the error "File not found" appears. It tries to extract file with the name of the app id listed in the manifest. I checked and found that the id in manifest does not match the id in app store. Unpacked the zip, changed the id in manifest according to id in app store,incremented the version number, repacked and published. After that tried to install - on Chrome running on OSX the app changed to compatible, but after downloading the zip and checking, appeared...

The issue 2 (unsolved yet): Appeared error "Manifest file is invalid"

The same happens when installing on ChromiumOS - the app is downloading successfully, the new app icon appears in apps drawer, and just after "checking" stage the icon disappeared from the apps drawer and the manifest error shows.

Can somebody advice me how to try to solve the issue? Any help appreciated.

I am listing the manifest file, generated by arc welder:

{
  "name": "__MSG_extName__",
  "default_locale": "en",
  "manifest_version": 2,
  "version": "1.0",
  "version_name": "1.0",
  "offline_enabled": true,
  "app": {
    "background": {
      "page": "app_main.html"
    }
  },
  "icons": {
    "16": "icon.png",
    "128": "icon.png"
  },
  "permissions": [
    "alarms",
    {"fileSystem": ["write"]},
    "overrideEscFullscreen",
    "unlimitedStorage",
    "notifications",
    "storage",
    "accessibilityFeatures.read",
    "https://clients2.google.com/",
    {"socket": ["tcp-connect", "tcp-listen", "udp-bind", "udp-send-to", "resolve-host", "resolve-proxy"]},
    "fullscreen"]
,
  "requirements": {
    "3D": {
      "features": ["webgl"]
    }
  },
  "kiosk_enabled": true,
  "import": [{"id": "mfaihdlpglflfgpfjcifdjdjcckigekc"}],
  "file_handlers": {},


  "arc_metadata": {
    "apkList": [
      "CityAdventures.apk"
    ],
    "enableExternalDirectory": false,
    "formFactor": "tablet",
    "name": "Discover 3D Shapes",
    "orientation": "landscape",
    "packageName": "com.myCompany.CityAdventures",
    "resize": "reconfigure"
  }
}

回答1:


Okay, so here's how ARC works.

The ARC Welder app allows you to test / create ARC Apps on any platform.

However, the final apps it generates rely on the App Runtime for Chrome extension. It is loaded with the Shared Module mechanism, and that's the mysterious id "mfaihdlpglflfgpfjcifdjdjcckigekc" from the manifest.

This module is required: you can't just throw it away from the manifest as the engine embedded in your App expects files loaded from it.

However, the App Runtime has the required components only for Chrome OS architectures. ARC Welder-created Apps are only supported on Chrome OS. On any other platform, the shared module is installed but does not provide the required files, resulting in your error #1. There is no solution to make your app deployable to anything except Chrome OS via the Web Store.

Your error #2 stems from the fact that Chrome tries to load your app as a shared module and it's not valid for that (not having the "export" key). You can't and shouldn't fix that - it's nonsensical to try and import itself as a shared module.

As for why your unmodified App fails to load in a virtual Chrome OS - it's hard to say, but probably it runs on an architecture not supported by ARC Runtime. Needs more details on how you set up the VM.



来源:https://stackoverflow.com/questions/36170936/chrome-app-store-porting-from-android-app-using-arc-welder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!