Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nvcken opened this issue Oct 22, 2014 · 33 comments
Open

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

nvcken opened this issue Oct 22, 2014 · 33 comments

Comments

@nvcken
Copy link

nvcken commented Oct 22, 2014

I try npm update -g chromeos-apk
After update --version still show 3.0.0

I try chromeos-apk mygame.apk
I get error when load unpack ext ---->
Failed to load extension from: D:......
There is no "message" element for key extName.

@wxvst2
Copy link

wxvst2 commented Oct 22, 2014

This is an easy fix.

$vim /path_to_com_dir/manifest.json
Copy the "name" parameter: "name": "field text"

$vim /path_to_com_dir/_locale/language/message.json
add the parameter to the "extName":
"extName": {
"description": "Extension name",
"message": "field text"
}

Don't forget the comma.

@dhufford81
Copy link

Hello wxvst2! I am trying to make the vmware horizon view apk work on a chromebook and and currently stuck with this same error. Can you be a little more descriptive. I tried to follow your instructions but i'm not sure what the final code should look like. here is what i have so far. please note "MSG_extName" was copied from com dir/manifest.json.

{
"appNotSupported": {
"description": "Message displayed when the app is not supported.",
"message": "This app is incompatible with your device. Check to make sure other Android apps work for you from the Chrome Web Store"
},
"extName":{"MSG_extName"
"description": "Extension name",
"message":""
}
}

When i try to load unpacked extensions in chrome with this i get syntax error. Before the copy paste i got the error there is no "message" element for key extName. any help is greatly appreciated. I'm sure it's simple but i'm not a programmer by any means! Thanks in advance!

@wxvst2
Copy link

wxvst2 commented Oct 24, 2014

Hey dhufford81 ,

I formatted my first answer wrong and it left out some details. So take a look again and it may be a little more clear.

Remember you need to edit the message.json file to fix the issue. Not the manifest.json file.

"enableExternalDirectory": false,
"formFactor": "tablet",
"name": "com.directv.sundayticket", <---- this is the name you need to take in manifest.json
"orientation": "landscape",
"packageName": "com.directv.sundayticket",
"useGoogleContactsSyncAdapter": false,
"usePlayServices": [
"gcm"
]

"extName": {
"description": "Extension name",
"message": "com.directv.sundayticket" <---- Add this line in your message.json file found in ../_locales/en/ directory
}

@dhufford81
Copy link

Thanks very much for the information. I have corrected the issue, and now the extension gives me the option to launch. However there is a pink warning that says: There were warnings when trying to install this extension: Unrecognized manifest key 'arc_metadata'.

When i hit the launch link it opens a white window with a picture of Android in it and nothing else happens. Does that mean the horizon.apk won't run on a chromebook? Thanks again!

@wxvst2
Copy link

wxvst2 commented Oct 24, 2014

You can ignore that warning. It will show for all packages.

I just tried the app myself. It seems to crash on start up. You can check by selecting Inspect views: app_main.html under launch.

The log should show you something like this:
Crash reporting not enabled in Chrome. Please enable it.
FINISHED REPORTING CRASH

Please try another app that has been proven to work to make sure your setup is correct. NYC Bus & Subway Maps app works.

@dhufford81
Copy link

Just wanted to report back, i played around with it for most of the day today and ended up getting it to work. I was able to launch a virtual desktop on my chromebook. The only problem now is getting it to go fullscreen =) Thanks very much for your help wxvst2!!

@Osama21
Copy link

Osama21 commented Nov 20, 2014

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."
I ran this in the chrome os shell, and this directory exists, but i do not have permission for it. is there a way to get permission.
here is a screenshot. any help will be greatly appreciated.
screenshot 2014-11-19 at 9 02 09 pm

@Staine
Copy link

Staine commented Nov 21, 2014

I got this message when tried to load an extension: 'import' extension is not installed.
What is the 'import' extension?

@kosiara
Copy link

kosiara commented Nov 27, 2014

I received this message when I fired the conversion with command:

chromeos-apk application.apk

The error was gone when I fired the conversion with all arguments:

chromeos-apk --tablet --scale --name ApplicationName application.apk

The problem for me was the locales messages.json:

_locales/en/messages.json

{
"appNotSupported": {
"description": "Message displayed when the app is not supported.",
"message": "This app is incompatible with your device. Check to make sure other Android apps work for you from the Chrome Web Store"
},
"extName": {
"description": "Extension name",
"message": "ApplicationName" //THIS LINE WAS GONE WIHOUT "--name ApplicationName" argument
}
}

@sevk
Copy link

sevk commented Nov 28, 2014

same error +1

@jimmygranit
Copy link

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

@wxvst2
Copy link

wxvst2 commented Dec 22, 2014

If you are able to launch the app, even partially, that means the modification to the message.json has worked. However, some apps just don't work with their given architecture. Some users over at Reddit are keeping a list of working, non-working, and partially working apps.

https://docs.google.com/a/genesismedia.com/spreadsheets/d/1iIbxaftAu_ho5rv9fUlXSLTzwU6MbKOldsWXyrYiyo8/edit#gid=0

If you would like to add your own testing to the spreadsheet fill out this form:

https://docs.google.com/a/genesismedia.com/forms/d/1UbSeFSNAPiS-nUiNZfI_rA_1GoAI2X931aXAs1wy5D8/viewform

@CoolOppo
Copy link

I get the same message on everything I even try to load as an extension in Chrome. My specs are:

  • Windows 8.1 64-bit
  • Chrome 41.0.2251.0 dev-m (64-bit)
  • node.js v0.10.34 (I'm actually updating it to v0.10.35 at this moment!)

@postadelmaga
Copy link

I confirm, pass name parameter fix the issue for me.

chromeos-apk --tablet --scale --name ApplicationName application.apk

@CoolOppo
Copy link

CoolOppo commented Jan 2, 2015

@postadelmaga It didn't fix it for me. What are you using for the application name? Is it the actual fully qualified package name (or whatever they call it on Android)? What I am trying to ask is whether the application name can be anything you choose, or if it has to be the thing like com.developername.blabla.

@mohhasbias
Copy link

thank you @postadelmaga
it works. the name parameter is working.
we just need to pass the package name (com.bla.bla.bla)

@nguyendt214
Copy link

@postadelmaga: You are right! yeah

@noahseis
Copy link

noahseis commented Apr 8, 2015

chromeos-apk -t -s -n Directv DIRECTV_4.0.5_1428466127059.apk�
Configures the apk to allow the loading of the unpacked extension!!�

App launches fine on a chromebox trying to watch something (as tablet) crashes the app
Here are a couple js console messages.
0x68AA8C31 is not a valid instance ID.gen_index.min.js:34 ChildPlugin.remove
plugin crashed: captured minidumpgen_index.min.js:108 Plugin.showCrash_

Any insight?

@CoolOppo
Copy link

CoolOppo commented Apr 8, 2015

@noahseis This obviously isn't the thread for your issue. Did you even read any of what is on this page?

@noahseis
Copy link

The apk (Directv DIRECTV_4.0.5_1428466127059.apk) compiles with the Node.js 0.12.2 (ia32) and npm tool.

That's what being discussed here, correct, compiling apk's to provide portability to the chrome browser / OS "pc like" hardware instead vs android device app use only.

I was checking to see if there's some troubleshooting tips when an app is compiled through the tool but crashes on the chromebook / chromebox - how do you adjust for bugs. Or do you?

@dardo82
Copy link
Contributor

dardo82 commented Jun 15, 2015

I've found the fix for this! :-D
It's just a matter of changing the long option.

In chromeos-apk.js it should be (for example):

    .option('-n, --ext-name [value]', 'Extension display name')

instead of

    .option('-n, --name [value]', 'Extension display name')

and

    if (program.extName) {
        messages.extName.message = program.extName;

instead of

    if (program.name) {
        messages.extName.message = program.name;

That's it. 8-)

dardo82 added a commit to dardo82/chromeos-apk that referenced this issue Jun 15, 2015
"program.name" is a already a function (or should i say that "name" is a method of the "program" object?), so it can't be used as a variable.
("program.name()" gives you back "chromeos-apk" in this case, for the sake of completeness.)
So using "commander" if you set the long option name to "--ext-name" it give you the property "extName" of the object "program".
(That is not taken.) (If i am right with the OOP lingo.)
@vladikoff
Copy link
Owner

@dardo82 cool thanks, will update

vladikoff added a commit that referenced this issue Jun 15, 2015
@dardo82
Copy link
Contributor

dardo82 commented Jun 16, 2015

Then this shouldn't be closed now?
(I'm not sure, that's my first time...)

@vitarahmi96
Copy link

Please help me, I don't even understand..

It shows this: Failed to load extension from: ~/Downloads/Game/com.ea.games.simsfreeplay_row_twerk
'import' extension is not installed.

{
"app": {
"background": {
"page": "app_main.html"
}
},
"arc_metadata": {
"apkList": [
"custom-android-release-1400197.apk"
],
"enableExternalDirectory": false,
"formFactor": "tablet",
"name": "com.ea.games.simsfreeplay_row",
"orientation": "landscape",
"packageName": "com.ea.games.simsfreeplay_row",
"useGoogleContactsSyncAdapter": false,
"usePlayServices": [
"gcm"
],
"resize": "scale"
},
"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",
"retainEntries",
"directory"
]
},
"https://clients2.google.com/",
"videoCapture",
"clipboardWrite",
"identity.email",
"alarms",
"storage",
"identity",
"audioCapture"
],
"requirements": {
"3D": {
"features": [
"webgl"
]
}
},
"update_url": "https://localhost",
"version": "1337"
}

what should I do?

Thanks in advance

@rocketinventor
Copy link

Did you install the archon runtime, first?

@vitarahmi96
Copy link

Not yet before. But actually after download the Evernote now I can launch the app. Thanks! :)

@jkcarraher
Copy link

Hello Everybody,
I am currently trying to load external extensions, from apk files, but when I click launch, noting happens.
I have tried 3 multiple games, including Minecraft, Growtopia, and Flappy bird.
I would love to have some help.
Thanks,
Taro

@SalahAdDin
Copy link

Thank you very much man, this solve my problem. So, can you put in chromeos a app icon option?

@miguelogin
Copy link

Same error here

@recolic
Copy link

recolic commented Oct 14, 2019

This is an easy fix.

$vim /path_to_com_dir/manifest.json
Copy the "name" parameter: "name": "field text"

$vim /path_to_com_dir/_locale/language/message.json
add the parameter to the "extName":
"extName": {
"description": "Extension name",
"message": "field text"
}

Don't forget the comma.

Note: the path should be _locales/$LANGUAGE/messages.json rather than _locale/language/message.json.

@milahu
Copy link

milahu commented Jan 10, 2020

2020 and i still have to patch the manifest.json files ....

here is an automatic patch, using jq and sponge commands

#!/bin/bash

n=jp.co.canon.bsd.ad.pixmaprint

f=$n.android/manifest.json
cat "$f"|jq '.name = $v' --arg v "$n"|sponge "$f"

f=$n.android/_locales/en/messages.json
cat "$f"|jq '.extName.message = $v' --arg v "$n"|sponge "$f"

@PrzemekSkw
Copy link

PrzemekSkw commented Feb 22, 2020

Hi, anyone can help me because I don't know what is wrong here:

manifest.json

{
  "app": {
    "background": {
      "page": "app_main.html"
    }
  },
  "arc_metadata": {
    "apkList": [
      "custom-android-release-1400197.apk"
    ],
    "enableExternalDirectory": false,
    "formFactor": "phone",
    "name": "com.xiaomi.smarthome",
    "orientation": "portrait",
    "packageName": "com.xiaomi.smarthome",
    "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"
}

message.json

{
  "appNotSupported": {
    "description": "Message displayed when the app is not supported.",
    "message": "This app is incompatible with your device. Check to make sure other Android apps work for you from the Chrome Web Store"
  },
  "extName": {
    "description": "Extension name"
    "message": "com.xiaomi.smarthome"
 }
}

Error when I load folder:
Zrzut ekranu z 2020-02-22 22-06-09

EDIT. I forgot comma "," :D

@User8395
Copy link

User8395 commented Jul 22, 2020

For me, it's saying "'import' extension could not be installed"
What do I do?
image

EDIT: Fixed it. Deleted the "import" array :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests