Android error codes meanings
This document describes possible error codes that may be thrown by VdoCipher Android SDK.
Internal System Error
Error Codes: 1201, 1202
These errors can be caused by devices that are configured with ADB debugging enabled.
Please make sure USB debugging is turned OFF. In "Settings > System > Advanced > Developer options > Turn off USB debugging".
Safetynet Verification Failed
Error Code: 1270
The error is caused by a failed SafetyNet validation, so make sure you do the following:
- The device is not rooted
- Hardware information can be recognized
- The software is sane
- The device is not monitored
- The device is not infected with malicious apps
- The Device’s profile can be recognized
Offline Media Not Found
Error Code: 4102
The downloaded video specified by the mediaId was not found on the device.
Either it was never downloaded, or was deleted earlier.
Network Error, Invalid Request
Error Codes: 5112, 5132
Service denial is likely caused by invalid OTP or other restrictions. Please contact VdoCipher support.
Network Error, Server Error
Error Codes: 5113, 5123, 5133, 5152
Possible error with VdoCipher servers.
This should automatically resolve quickly. Please try playback again. If it doesn't resolve, please contact VdoCipher support.
Error Getting Meta, Invalid Request
Error Code: 5122
Seen on very old versions of the VdoCipher android SDK when the OTP is expired.
Kindly upgrade to the latest version of the VdoCipher Android SDK.
Error Getting Meta, Network IO Error
Error Codes: 5124, 5130
Network error most likely caused by dropped internet connection.
Please try playback on both cellular and WiFi. It should correct itself once the user tries again with a stable connection.
Parser Error
Error Code: 6130
The error can occur as a result of an error in parsing media data and metadata. Check your media data and metadata format. Contact VdoCipher support if it does not resolve.
Offline Source Error
Error Code: 5160
If someone tries to play offline media after deleting the source file, they may encounter this error. Make sure offline source files are not deleted from local storage.
Media Crypto Error, Insufficient Protection
Error Code: 6193
This indicates that the output protection levels supported by the device are not sufficient to meet the requirements set by the content owner in the license policy. Read more about it here
DRM State Reset Error
Error Codes: 6157, 6161
These errors are related to error occurring in the device's Widevine CDM (Content decryption module) responsible for secure playback.
These are often caused when more than one VdoPlayer instances are active at once. Please ensure only one player is embedded in a single page, and instances are properly released.
These often resolve automatically on killing and restarting the app.
If the error persists, please ask the user to try the following steps one by one, trying playback after each step:
- Exit the app and kill it (remove it from the Recent Apps screen), and open it again
- Re-install the app
- Reboot the device
- Install any pending system updates
- Clear Phone cache
- If possible, do a factory reset
Key Response Rejected For Secure Playback, Illegal State
Error Codes: 6172, 6177, 6181, 6190, 6196
These errors are related to error occurring in the device's Widevine CDM (Content decryption module) responsible for secure playback.
These often resolve automatically on killing and restarting the app.
If the error persists, please ask the user to try the following steps one by one, trying playback after each step:
- Exit the app and kill it (remove it from the Recent Apps screen), and open it again
- Re-install the app
- Reboot the device
- Install any pending system updates
- Clear Phone cache
- If possible, do a factory reset
OTP Time Expired
Error Code: 2013
It means the OTP expired by the time playback was initiated. One common reason is that suppose app is open but playback was not started, later after some minutes the user tried to play the video , then it will give this error as the OTP would have expired. But refreshing the app will play, thus user won't report it in most cases.
Internal Error
Error Code: 6101
These errors are related to failure in the device's secure decoder which is responsible for decoding and playing DRM protected video.
Often it can be related to a resource related issue (meaning more such failures when there is for e.g. high RAM or cpu usage) and is temporary.
It may be permanent in some rare cases too. However, since the error is in the device's internal secure video decoder, and is not controllable by the external resources, it is difficult to totally avoid such errors.
Only system/OS updates may fix the issue permanently. Also, just restarting the phone may help clean out resources or reconfigure settings and may fix it for many devices.
Such decoder related errors are also reported on the ExoPlayer library which our SDK uses for playback, but they also don't meet any resolution since it is related to the device's internal decoders. Most of these devices are a bit old (E.g Redmi 3S).
With updates to the library and OS in general, such errors will become less frequent and identify errors better (instead of failing inexplicably during decoding), but for now unfortunately it cannot be totally fixed in one go.
So, App restart, Phone restart, and OS update should be tried. If not resolved, then it can not be corrected currently.
Illegal Media DRM State
Error Codes: 2021 ,2022, 1220, 1250 , 1253 , 6155, 6156 ,6157, 6166 , 6178 , 6186,
Reason - Device says it can support Widevine DRM but while playing it does not support it. 2021 has occurred in some Redmi Note 8 Pro devices (not all).
Please ask the user to
- Reboot the device, and
- Install any pending system updates.
- Clear Phone cache
- If possible do a factory reset.
If above steps do not resolve, then it can not be corrected.
Init Params Invalid
Error Code: 4101
4101 error means OTP or playback info is not created correctly at your end, thus this error. Please check OTP and playback info creation at your end. Please read this doc for exact steps on OTP and playback info for correction - https://www.vdocipher.com/docs/server/playbackauth/otp/
If you feel it is fine, then you should send one sample OTP and playback info which has error to support@vdocipher.com, so that we can identify the issue.
Decoder Initialization Failed
Error Code: 6122
This can occur temporarily on some rare devices (also permanently on a few) due to memory or resource constraints required for video playback, and usually recovers automatically upon phone restart.
This can also happen if the video decoder on the device fails for some reason. Also, make sure you are not loading more than one VdoPlayer instance at any given time, as that would make this error much more common.
Network Error
Error Code: 5110, 5114
A probable use case and solution for this error- It means generic network error (most likely the device was having internet connection issues while playing the video)
- Please make sure online playback is not triggered when user selects an offline video in the app UI.
- The error code 5110 may also occur in offline playback if the downloaded files have been moved or deleted directly by the user, for e.g. by using a file manager app. Please make sure this is not the case. You can ask the user to delete and retry the same download, then turn off internet and play as soon as the status is complete, and check if it works then.
Renderer Error
Error Code: 6120
This can occur temporarily on some rare devices (also permanently on a few) due to memory or resource constraints required for video playback, and usually recovers automatically upon phone restart.
This can also happen if the video decoder on the device fails for some reason. Also, make sure you are not loading more than one VdoPlayer instance at any given time, as that would make this error much more common.
Internal Database Error
Error Code: 6102
This can occur for offline videos if the download is not yet complete or it failed. You can only load videos which completed successfully, you can use query filters to only show play option on completed downloads in your app, depending on your app UI requirements. Can you check and confirm users can only try to play completed downloads in your app, and in-progress or failed downloads do not show an option to play?
Error Getting Meta, Network IO Error
Error Code: 5124
This is a network error most likely caused by dropped internet connection. It should correct itself once the user tries again with a stable connection.
Error Getting Meta Data
Error Code: 5120
Means meta data could not be loaded before loading the video. This too can be caused by network connection issues.
Offline Source Error, File Not Found
Error Code: 5161
Offline file has been some how deleted and still prompted to play. Kindly ensure that offline file is still there in device.
Main reason why files can be accidentally deleted - Offline encrypted files are stored inside android device itself. Suppose a viewer uses some file manager tool and accidentally deletes encrypted files, then this will happen.
No Supported Media Delivery Format Available
Error Code: 1220
The error comes when the device does not have required Widevine DRM APIs.
To retry, the user can close the app and start again. Also, if there are any system updates available, they should update the OS. If these 2 steps do not solve the issue, then it means DRM can not be supported in this device and thus playback is not possible.
Key Request Failed, Network IO Error
Error Code: 5151
It is a network specific issue and generally happens when particular ISP in some city/state has some issue with our cloud urls. It is many times temporary and resolves itself in few hours or 1-2 days. Below method can be tried for the cases not resolved -Try each of the following only one after the other. After each step, check if the video is playing. Proceed to the next step if still not playing.
- Remove any network filtering/firewall/VPN app if any
- Clear Phone Cache-Reset Wifi . Reset App preferences. (These options are in most phones)
- Reboot the device
- Open "https://license.vdocipher.com" on the browser and see if that opens correctly. Send screenshot of the opened page
- Factory Reset (in case possible) of device
Error Code: 5154
The error occurs when our app cannot establish a secure connection with our server. To resolve this, you can try resetting your device's network settings. This action will reset all network-related settings on your device, such as Wi-Fi, mobile data, etc., to their default values. After resetting, you can try using the app again to see if the issue is resolved.
DRM Keys Expired
Error Code: 6187
This means key expiration. so it probably means that the offline keys have finished their rental duration. First, it should be checked if actually the license has expired; license time starts counting from the time the license was obtained (video downloaded), not when the video is first played. If above is not the reason and still the issue happens, then kindly send mail to support@vdocipher.com with device details and your offline OTP code, we will check and guide further.
Error Creating Key Request For Secure Playback
Error Code: 6166
Caused when creating the license request in the widevine CDM (Content decryption) fails.
Android API suggests this -- "had an unrecoverable failure in the DRM plugin or security hardware"
This is often temporary and can sometimes be resolved by just closing the current playback session by killing and restarting the app, or rebooting the device if necessary. If that doesn't fix it, as OS update if available should be tried, otherwise not much can be done. Also, this has occurred very rarely in our previous experience.
License Error
Error Code: 1050
This is for offline mostly and during integration issue. It has not been seen in live production yet.
Correction suggestions:
- Below is a suggestion on license rule code when this error can occur. If it is right for your use case , then kindly send the request body you are sending for the OTP. The licenseRules need to be serialized separately. Please check some of the same code available at https://dev.vdocipher.com/api/docs/book/playbackauth/offline.html
"licenseRules": "\{
\"canPersist\":true,
\"rentalDuration\":2592000
\}"
}
Better to use a JSON stringify function such as JSON.stringify in node or json_encode in PHP instead of escaping directly like in the above code. The sample code at the above link should be helpful.
- The error in your code is the missing serialization (json_encode) step in licenseRules. There needs to be two json_encode on the licenseRules and the JSON body. Please check the sample code in this page. https://dev.vdocipher.com/api/docs/book/playbackauth/offline.html#
Error Code: 1052
The error occurs when our app cannot establish a secure connection with our server. To resolve this, you can try resetting your device's network settings. This action will reset all network-related settings on your device, such as Wi-Fi, mobile data, etc., to their default values. After resetting, you can try using the app again to see if the issue is resolved.
DRM Error
Error Code: 1060
Offline playback related error. We have seen more error rates with this device Redmi Note 8 Pro compared to other phones, both in offline and online playback. Error 1060 means that there was an internal error from the OS when setting up the offline license. However, not all Redmi Note 8 Pro devices show error. There are a lot that work fine. That is why, our first recommendation is to reboot the device or install any pending Android updates so as to reset the content-decryption-module in the OS. If possible to factory reset the device, then it can be tried but it is not guaranteed to correct it. Otherwise, this device can not be used for saving and playing videos offline.
Download Manager Error
Error Code: 1006
If it is first time setting up offline for integration, make sure the provided path is writable and accessible by app.
If only one viewer is having this error and app is otherwise working well, re-install the app.
If there are any app virtualisation processes such as those which provide "app lock" or "double profiles" for any android app, disable those for this app, reboot and try again.
Error Code: 1007
For Android target SDK version 34 and higher, the application requires the permission android.permission.FOREGROUND_SERVICE_DATA_SYNC
. Therefore, please ensure that this required permission is declared in the app's manifest file.
Provisioning error
Error Codes: 6197, 6198
This happens when DRM provision request fails as device tries to provision a DRM certificate so that DRM servers can be sure they know who they are talking to.
These often resolve automatically on killing and restarting the app.
If the error persists, please ask the user to try the following steps one by one, trying playback after each step:
- Exit the app and kill it (remove it from the Recent Apps screen), and open it again
- Re-install the app
- Reboot the device
- Install any pending system updates
- Clear Phone cache
- If possible, do a factory reset