vladikoff / chromeos-apk

☢️ Run Android Apps in Chrome OS OR Chrome in OS X, Linux and Windows.
MIT License
7.74k stars 926 forks source link

There is no "message" element for key extName. #123

Open chaosink opened 9 years ago

chaosink commented 9 years ago

I used chromeos-apk to generate an app, but when I load it, chrome always said "There is no 'message' element for key extName." and the loading failed. Then I compared the app I generated with the demo 2048, and I found the difference in appname/_locales/en/messages.json: there isn't the sentence " 'message':'app.name' ". So I add it to the file and the load succeeded. Is there something imperfect in the program?

Osama21 commented 9 years ago

Hello everybody, I had this same error before, and i followed the steps given here. I resolved the error of "There is no 'message' element for key extName." but i get a new error saying "invalid locale file '/home/chronos/u-84674c466b6edd2e4de574185c16a8d60d1f91e7/Downloads/Random/APK/com.instagram.android.android/_locales/en/messages.json': Line: 8, column: 5, Syntax error." here is a screenshot. any help will be greatly appreciated. screenshot 2014-11-19 at 9 02 09 pm

chaosink commented 9 years ago

Maybe you forgot a ',' at the end of line 8.

chaosink commented 9 years ago

The log said the error happened in line 8. You'd bettet show line 8 in your screenshot. : )

tiwiism commented 9 years ago

I have the same error in the same situation as Osama21. Thank you for any help you can provide.

errorjson

gshmu commented 9 years ago

After update the chromeos-apk: sudo npm install -g chromeos-apk@latest


Error Loading Extension

Failed to load extension from: ~/apk-env/com.digiplex.game.android There is no "message" element for key extName.

{
  "app": {
    "background": {
      "page": "app_main.html"
    }
  },
  "arc_metadata": {
    "apkList": [
      "custom-android-release-1400197.apk"
    ],
    "enableExternalDirectory": false,
    "formFactor": "phone",
    "name": "com.digiplex.game",
    "orientation": "portrait",
    "packageName": "com.digiplex.game",
    "useGoogleContactsSyncAdapter": false,
    "usePlayServices": [
      "gcm"
    ]
  },
  "default_locale": "en",
  "icons": {
    "16": "icon.png",
    "128": "icon.png"
  },
  "import": [
    {
      "id": "mfaihdlpglflfgpfjcifdjdjcckigekc"
    }
  ],
  "manifest_version": 2,
  "name": "__MSG_extName__",
  "oauth2": {
    "client_id": "133701689125-jj0hr4gb0ff4ulsbrn0uk2i4th946d4c.apps.googleusercontent.com",
    "scopes": []
  },
  "offline_enabled": true,
  "permissions": [
    "gcm",
    {
      "socket": [
        "tcp-connect",
        "tcp-listen",
        "udp-bind",
        "udp-send-to",
        "resolve-host"
      ]
    },
    "unlimitedStorage",
    "notifications",
    "clipboardRead",
    {
      "fileSystem": [
        "write"
      ]
    },
    "https://clients2.google.com/",
    "videoCapture",
    "clipboardWrite",
    "identity.email",
    "alarms",
    "storage",
    "identity",
    "audioCapture"
  ],
  "requirements": {
    "3D": {
      "features": [
        "webgl"
      ]
    }
  },
  "update_url": "https://localhost",
  "version": "1337"
}
WhiteAbeLincoln commented 9 years ago

for flipboard, this was the extName key in appname/_locals/en/messages.json.

"extName": {
    "description": "Extension name"
  }

I fixed the error by adding the key 'message': "Extension name".

"extName": {
    "description": "Extension name",
    "message": "Flipboard"
  }

You can also change 'Extension name' to whatever you want, and that is what will show up as the app name in chrome and the app launcher.

This whole extName key was added by the chromeos-apk program, so I am assuming it is a bug. It should be an easy fix, so I might make a pull request later. It depends on how ChromeOS handles this key, compared to linux, which I'm on right now.

gshmu commented 9 years ago

@WhiteAbeLincoln Thanks,fixed the failed, but still can't run...

jimmygranit commented 9 years ago

I have the same issue.... I added the "message" key (used from the "name" key in manifest.json), but when i run the app, it start the emulator, have a blackscreen for 0.5 sec, then the program just ends...

I tried this on 2 different apps, with same results....

nguyendt214 commented 9 years ago

Follow: https://github.com/vladikoff/chromeos-apk/issues/111

Zarinia commented 7 years ago

use this chromeos-apk --tablet --scale --name YourName Your.apk

alihesari commented 7 years ago

I use this: chromeos-apk --tablet --scale --name YourName Your.apk and the problem was solved. Thank you.

vedvarshith commented 3 years ago

thanks it helped me a lot how did you get this trick