I getting errors when try to play m3u8 : W/MediaControlChannel: received unexpected error: Invalid Request.
W/MediaQueue: Error fetching queue item ids, statusCode=2100,
statusMessage=null.
I don’t understand if the problem is with the server CORS or the if the error is in the android app.
Link - "https://cdn.dev.yomobile.xyz/test/hls/c35ce4c4-d8a9-49ea-98a3-b98f99d4b8d4/master.m3u8"
You can see projects with my code integration cast https://github.com/OlegKopeykin/chromecast-simple
Related
Problem
I'm trying to stream a m3u8 file in a react native app (for android TV) and I'm getting this error:
LOG {"error": {"errorCode": "22004", "errorException": "com.google.android.exoplayer2.ExoPlaybackException: Source error", "errorStackTrace": "com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:632)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:604)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:223)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403
at com.google.android.exoplayer2.ext.okhttp.OkHttpDataSource.open(OkHttpDataSource.java:329)
at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:258)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:99)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:62)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:174)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
", "errorString": "ExoPlaybackException: ERROR_CODE_IO_BAD_HTTP_STATUS"}}
I don't know java so from the above traceback I'm guessing that the server is responding with an HTTP 403 and therefore it is unable to stream the file.
What I've tried
This one is not much of a solution but I tried switching to the react-native-video-player instead of react-native-video but that didn't work.
I tried passing the type: 'm3u8' and type: 'hls' inside the source attribute of the video tag along with the uri and this didn't help at all.
Tried to check if another m3u8 url (i.e. from another domain/server) is working, and it is working.
Downgrading react-native-video version, problem persists with different error message.
I decided to ssh into my android TV and directly use curl to fetch the m3u8 file and it responds with this:
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Moreover, many of the issues I found on github having a similar problem contain a URL that gives the same response when fetched directly with curl. Interestingly, if I use the fetch API in JS to console log the response from the m3u8 url, it works perfectly. So I'm guessing the problem is somewhere in exoplayer.
Specs
react-native : 'npm:react-native-tvos#0.69.6-0'
react-native-video : '^6.0.0-alpha.3'
Android TV : Tested both on a Raspberry Pi running Android TV (LineageOS I think) and an actual android tv set top box with same results.
The issue was with the user-agent header, exoplayer was setting a user-agent which was causing an HTTP 403. I had to use a proxy to figure this out and still have no clue as per why android studio was not showing the request that had an error.
I followed this doc to upload my assetlinks.json file to server, and it can be browsed by url like https://host/.well-known/assetlinks.json. However when I tested it using this tool and got an error "No app deep linking permission found for xxx at xxx" with json response as:
{
"maxAge": "599.999999805s",
"debugString": "********************* ERRORS \n Error: unavailable: Error fetching statements from https://host./.well-known/assetlinks.json (which is equivalent to 'https://host/.well-known/assetlinks.json'): URL_ERROR/3 [14] while fetching Web statements from https://host./.well-known/assetlinks.json (which is equivalent to 'https://host/.well-known/assetlinks.json') using download from the web (ID 1).\n* INFO MESSAGES ********************\n Info: No statements were found that match your query\n",
"errorCode": [
"ERROR_CODE_FETCH_ERROR"
]
}
Is there any solution for this issue? Thanks for any idea!
I have a problem with the Podio SDK on Android in the following scenario:
I have uploaded an image to Podio from our server in a php script and returned the file_id to my Android app via http. The id seems to be valid, but when i try to create an item using this file_id for an image field value i get the following error messages:
E/Volley: [49051] BasicNetwork.performRequest: Unexpected response code 404 for https://api.podio.com/item/app/17418679
com.podio.sdk.ApiError: {"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/item\/app\/17418679","query_string":"","method":"POST"},"error_description":"Object not found","error":"not_found"}
If i do not attach the image the item create call works fine
I used the newest version of the Podio Android SDK from Github (https://github.com/podio/podio-android) compiled using Android Studio 2.3 and build tools version 25.
I already found an error where the wrong app_id was used, but fixing that still left me with the same message.
This used to work only a few weeks ago, maybe there was change in the API? Do you have any tips on what else could cause this problem? I am using different client id / secret in the php script than in the app, could that be the reason?
I am using IMA SDK (iOS - Swift) to play pre-roll ads(Wrapper VAST 3.0)
But when i use this url "http://fusioniprojects.com/rnd/addpod/adpods.xml"
I am getting following error in my log
"Unable to request ads from server due to network error."
and when i am using the url of this type -
"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dredirecterror&correlator="
its running fine.
I fallow the solution of this problems from here ( ref - https://groups.google.com/forum/#!topic/ima-sdk/DqE5GruzwwA),
Now its Playing only 1 ad in Android project,not multiple ad and not working for iOS at all.
It may be that I am doing some things wrong in my iOS project but i also downloads the sample project from IMA-SDK (ref - https://github.com/googleads/googleads-ima-ios/releases), But it did not help me to come out with this problems, I am getting same error.I don't know how is it running (at least 1 ad) for the Android project after changes on the server.
Is it problems of IMA-SDK? or am I doing something wrong?
Used IMA SDK version 3.3.1 in iOS.
If you are using Apache sever then To add the CORS authorization to the header using Apache, simply add the following line inside either the Directory, Location, File or VirtualHost sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf), or within a .htaccess file: below of the code put inside .htacces file.
Header set Access-Control-Allow-Origin '*'
Header set Access-Control-Allow-Credentials true
I created ibm-mobilefirst-starter:latest container in bluemix. And I am able to access the MFS console.I can see MobileFirstStarter run time its working fine. Now I uploaded new .wlapp and one http .adapter file into MFS console and they are visible in Console. When I try to access the Adapter from Common Resources I am getting Error :
[http://134.168.31.10:9080/MobileFirstStarter/authorization/v1/clients/preview] failure. state: 404, response: The server was unable to process the request from the application. Please try again later.
Client registration failed with error: {"responseHeaders":{"Date":"Tue, 01 Mar 2016 12:35:44 GMT","Connection":"Close","X-Powered-By":"Servlet/3.0","Content-Length":"0","Content-Language":"en-US"},"status":404,"responseText":"","errorCode":"UNEXPECTED_ERROR","errorMsg":"The server was unable to process the request from the application. Please try again later.","invocationContext":null}
I tried with Android environment and tested in device. Couldn't see any response from adapter.
Thanks in Advance.
There is no preview available from the console in non-development environments (i.e. MobileFirst Studio plug-in for Eclipse).
It is unclear from your question if only the preview failing or also from a device/emulator.