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

Improve log output when filenames are invalid #39

Open
DavidFrahm opened this issue Jul 15, 2015 · 1 comment
Open

Improve log output when filenames are invalid #39

DavidFrahm opened this issue Jul 15, 2015 · 1 comment

Comments

@DavidFrahm
Copy link

I had a heck of a time tracing/debugging an issue where the videos would not play, and it was due to the known Android restriction of filenames needing to be lowercase.

Even though I knew about the filename restrictions, I thought I had that taken care of and so I tried using the logcat/console output to point me to the root cause.

I feel like it would have really helped if somewhere an error would have been thrown. Something like the typical "FILES MUST CONTAIN ONLY [a-z0-9_.]" error, or even more specific and explanatory for the use case of this video plugin.

The logcat output I did get was this:

W/ResourceType( 3820): No package identifier when getting value for resource number 0x00000000
E/Html5VideoCordovaPlugin( 3820): Failed to copy video file to data dir.
E/Html5VideoCordovaPlugin( 3820): android.content.res.Resources$NotFoundException: Resource ID #0x0
E/Html5VideoCordovaPlugin( 3820):   at android.content.res.Resources.getValue(Resources.java:1266)
E/Html5VideoCordovaPlugin( 3820):   at android.content.res.Resources.openRawResourceFd(Resources.java:1224)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.plugin.b.a(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.plugin.b.a(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.plugin.Html5Video.a(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.ae.a(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.bi.a(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.s.a(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at org.apache.cordova.as.exec(Unknown Source)
E/Html5VideoCordovaPlugin( 3820):   at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
E/Html5VideoCordovaPlugin( 3820):   at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
E/Html5VideoCordovaPlugin( 3820):   at android.os.Handler.dispatchMessage(Handler.java:102)
E/Html5VideoCordovaPlugin( 3820):   at android.os.Looper.loop(Looper.java:135)
E/Html5VideoCordovaPlugin( 3820):   at android.os.HandlerThread.run(HandlerThread.java:61)
@DavidFrahm
Copy link
Author

By the way, I see that there is some callback error handling in Html5Video.js here:

https://github.com/jaeger25/Html5Video/blob/master/www/Html5Video.js#L23

However, I never say that output anywhere. Might be another related opportunity for improvement.

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

1 participant