Video plays in chrome, but not in Android device

54 views
Skip to first unread message

Steve Husting

unread,
Jul 25, 2015, 2:52:36 PM7/25/15
to phonegap
I am using the following to play back the YouTube links, which has always worked for all previous versions of this hymnal app:

<p class="note">This video requires an active Internet connection.</p>

<div id="contentvid">
<ul class="pageitemvid">
<li class="menu"><a href="http://www.youtube.com/watch?v=NRJHKzU_t1M">
<span class="name">A mighty Fortress is our God</span>
        </a>
    </li>
    </ul>
</div>

Config.xml has <access origin="*" launch-external="yes" />

Uninstalled android platform via CLI and reinstalled. 

All the pages work fine except for the link buttons to youtube. 

Any particular reason why these links would stop working? 

cordova -v: 5.0.0
Mac OS X 10.10.4 Yosemite
Not using a JS framework; not for PG Build

Thanks for any advice on where to look next. 


Jesse Monroy

unread,
Jul 26, 2015, 12:07:33 AM7/26/15
to phonegap, steve...@earthlink.net
Have you tried swapping out the link for something you know that works?

Jesse

Steve Husting

unread,
Jul 26, 2015, 1:09:56 AM7/26/15
to phonegap, jess...@gmail.com
Yes, the link I posted in the message box above was an old one that worked, but no longer works. I had made no changes to it. That's what makes this so puzzling.  You can copy/paste the URL into any browser and it just works. 

One thing might be pertinent: all the pages with video links are in the /merge folder (iOS and Android video links are formatted differently.)

Thanks for responding, Jesse. 

Kerri Shotts

unread,
Jul 26, 2015, 3:22:46 PM7/26/15
to phonegap, steve...@earthlink.net, steve...@earthlink.net
Steve,

Define "stop working" -- Does an error display, etc? 

You mention Android -- are you also targeting iOS? If so, does it have the same problem?

Does the issue occur on an Android emulator or physical device?

Has anything changed recently with respect to your target (OS update, etc)?

Anything in the console? adb logcat?

If you navigate to that address using Chrome (or similar), what happens? Does it launch a new app, or does it play inside the browser? I'm wondering if an intent is at fault here.

Steve Husting

unread,
Jul 26, 2015, 5:05:21 PM7/26/15
to phonegap, kerri...@gmail.com
Answers are below. Thanks, Kerri.


On Sunday, July 26, 2015 at 12:22:46 PM UTC-7, Kerri Shotts wrote:
Steve,

Define "stop working" -- Does an error display, etc? By stop working, I mean tapping on the button has no effect. The button responds with the tap highlight color, that's it.

You mention Android -- are you also targeting iOS? If so, does it have the same problem? I'm just targeting Android at this time. 

Does the issue occur on an Android emulator or physical device? It occurs on the actual device, a Nexus 7, latest edition of the tablet. I've no reason to test on an emulator. 

Has anything changed recently with respect to your target (OS update, etc)? There was a new update to the OS, but I did not accept it until after the app was released; the last time I tested the app, the OS had not been upgraded. 

Anything in the console? adb logcat? Playing it in chrome, there are no error messages but this on clicking the link to the video: 
 
GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED

And it still played.  

If you navigate to that address using Chrome (or similar), what happens? Does it launch a new app, or does it play inside the browser? I'm wondering if an intent is at fault here. It plays in the browser as you would expect it to. 

This is why it is so perplexing to me. It's simply a URL link to a YouTube page. It has always worked the past 12 versions.

Steve Husting

unread,
Jul 26, 2015, 10:55:01 PM7/26/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
I think the problem occurred when I got a Command failed with exit code B, and ten I removed android and re-installed it, and forgot to update the AndroidManifest file. I am going to work on that next and see. 

Kerri, thank you for turning my mind in a new direction. 

Steve Husting

unread,
Jul 27, 2015, 11:18:51 PM7/27/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
I updated AndroidManfest, ran cordova build android, and got:

/Users/steve/Documents/APPS/Hymnal/Pocket_Hymns/platforms/android/cordova/node_modules/q/q.js:126

                    throw e;

                          ^

Error code 1 for command: /Users/steve/Documents/APPS/Hymnal/Pocket_Hymns/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/steve/Documents/APPS/Hymnal/Pocket_Hymns/platforms/android/build.gradle,-Dorg.gradle.daemon=true

ERROR building one of the platforms: Error: /Users/steve/Documents/APPS/Hymnal/Pocket_Hymns/platforms/android/cordova/build: Command failed with exit code 8

You may not have the required environment or OS to build this project

Error: /Users/steve/Documents/APPS/Hymnal/Pocket_Hymns/platforms/android/cordova/build: Command failed with exit code 8

    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)

    at ChildProcess.emit (events.js:98:17)

    at maybeClose (child_process.js:756:16)

    at Process.ChildProcess._handle.onexit (child_process.js:823:5)


It's getting worse, not better! LOL

In the past, when I had this code 8 error, I simply did a platform rm android and platform add android and that solved it. It's not solving it now. I'm stuck again. 

Steve Husting

unread,
Jul 27, 2015, 11:35:15 PM7/27/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
I found the problem and got a successful build. My AndroidManifest had android:targetSdkVersion="23," which wasn't installed. I changed 23 to 22 (which was installed), and got BUILD SUCCESSFUL!

Steve Husting

unread,
Jul 27, 2015, 11:52:33 PM7/27/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
I did a cordova build android and got the same error again! 

Jesse Monroy

unread,
Jul 28, 2015, 12:17:09 AM7/28/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
Transient Error=Bad RAM.

My work laptop has some bad bits. Living in El Paso (It' been 100F all week, and wet 20+% humidity),
then working on a two inch solid-wood (pine) table top tends to bring out those bad bits.
After 3 or 4 hiberination cycles and I have to reboot the machine. I noticed the pattern when in the
evenings I would go to Jack in the Box (has AC running COLD!!) and everything worked fine.

If you have another machine give it a try.

Jesse

Steve Husting

unread,
Jul 28, 2015, 10:35:47 AM7/28/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net, jess...@gmail.com
Will try the Mac at work, then, thanks.
Looks like you gave me a reason to shop for a new Mac laptop LOL.

Steve Husting

unread,
Jul 30, 2015, 11:07:12 PM7/30/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net, jess...@gmail.com, shus...@aeteam.net
I first tried to set up my Windows machine right next to my Mac. No go - several hours later and I still can't get my setup right. cordova create myApp complains about not recognizing node. Yuck. What a mess. The nodejs address is right there in env vars. 

Jesse Monroy

unread,
Jul 31, 2015, 1:22:05 AM7/31/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net, shus...@aeteam.net
Steve,
I was hoping one of the previous simpler solutions would have been it.

I got to thinking and a few things came to mind. I assume you have done these, but I am stating them just for completeness.

As you recall about a month or so ago we move to cli-5.1.1. Around that time people had all sorts of problems.

#1 browser performance changed. Almost like a less powerful webview was put in place. Perhaps try an older webview, or crosswalk.
#2 White-list became the default. Previously, an App had unencumbered access to all websites. I assume you have the white-list AND the plugin implemented. (Related bug fix in May)
#3 In addition to #2, some "official" messages may have missed your observation, mostly because they are for Phonegap Build. However, they may affect your situation. Notes for upgrading to cli-5.1.1 on PGB

Let me know if any of this helps,
Jesse

Kerri Shotts

unread,
Aug 1, 2015, 4:12:43 PM8/1/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
Hey Steve --

Do you have a gist/repo available that demonstrates the issue? I could try it on my Samsung tablet to see if it has the same problems you are experiencing.

Steve Husting

unread,
Aug 1, 2015, 5:52:00 PM8/1/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
Thank, Kerri. At this point, I am following Jesse's idea of trying it out on another computer to check if the problem is a Mac RAM failure (that's a useful thing to know, because I know the cd/dvd drive is failing). I'm still in the throes of setting up my PC on the next table over at home. Current issues with the setup:

1. android in command prompt does not bring up the SDK Manager. android is not recognized. However, I have installed Android Studio and set the SDK Manager in AS. Still, I wonder what I'm supposed to do in Windows to make android work in the prompt. Not sure what to put for EnvVars.

2. ant is not recognized. It is installed at C:\Program Files\apache-ant-1.9.6. EnvVar: Variable name: %ANT_HOME%\bin. Variable value: C:\Program Files\apache-ant-1.9.6 So why isn't it recognized? The \bin folder exists, and ant is in that folder. 

3. cordova create myApp does not create the folder in the specified location, so it is missing something. 

Steve Husting

unread,
Aug 1, 2015, 6:01:40 PM8/1/15
to phonegap, kerri...@gmail.com, steve...@earthlink.net
All the steps I've taken to set up the environment for Windows is in this post (it was formerly of Mac setup only): 
Reply all
Reply to author
Forward
0 new messages