-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hello RevoPush Team,
We're experiencing a critical issue with @revopush/react-native-code-push v1.5.0 where the mobile app cannot fetch CodePush updates because your API is returning HTML instead of JSON.
Environment Details
- Library Version: @revopush/react-native-code-push v1.5.0
- React Native Version: 0.75.5
- App Name: Cialfo App
- Deployment: Staging
- Deployment Key: oCWs5JBRdArDYVGhyqewKPQH0vNTEJ2G2eqsGg
- App Versions: iOS 4.3.30, Android 4.3.38
- Server URL: https://app.revopush.org
The Problem
When the mobile app tries to check for updates, all API requests to https://app.revopush.org/v0.1/public/codepush/update_check return HTML (web UI page) instead of JSON, causing the following errors:
[CodePush] JSON Parse error: Unrecognized token '<'
CodePush: An unknown error occurred
API Test Results
Test 1: GET Request
curl "https://app.revopush.org/v0.1/public/codepush/update_check?deploymentKey=oCWs5JBRdArDYVGhyqewKPQH0vNTEJ2G2eqsGg&appVersion=4.3.30&label=&packageHash=&isCompanion=false&clientUniqueId=test"Response:
- Status: HTTP 200 OK
- Content-Type:
text/html; charset=utf-8❌ (Expected:application/json) - Body: HTML page (Revopush web UI)
Test 2: POST Request
curl -X POST "https://app.revopush.org/v0.1/public/codepush/update_check" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"deploymentKey":"oCWs5JBRdArDYVGhyqewKPQH0vNTEJ2G2eqsGg","appVersion":"4.3.30"}'Response:
- Status: HTTP 405 Method Not Allowed ❌
What Works ✅
- CLI deployment:
revopush release-react "Cialfo App" ios --deploymentName Stagingworks perfectly - Dashboard: Release v41 appears correctly in the RevoPush dashboard
- CLI commands:
revopush deployment list "Cialfo App"shows deployments correctly - Update exists: Release v41, App Version 4.3.30, deployed successfully
What Doesn't Work ❌
- Mobile app update checks: API returns HTML instead of JSON
- Native SDK requests: @revopush/react-native-code-push library cannot parse HTML responses
Expected vs Actual Behavior
Expected API Response:
{
"updateInfo": {
"isAvailable": true,
"appVersion": "4.3.30",
"label": "v41",
"downloadUrl": "https://...",
"description": "iOS Staging Update for v4.3.30",
"isMandatory": false,
"packageSize": 23150000
}
}Actual API Response:
<!doctype html>
<html lang="en">
<head>
<title>Revopush</title>
...
</head>
<body>
<!-- Web UI HTML -->
</body>
</html>Questions for RevoPush Team
- Is the API endpoint correct? Should we use a different endpoint for v1.5.0?
- Are there required authentication headers beyond the deployment key?
- Is there a known issue with v1.5.0 and the current API?
- Should we use GET or POST? Tests show GET returns HTML and POST returns 405
- Is there API documentation for the update_check endpoint?
Impact
Our production mobile app (4.3.38 Android, 4.3.30 iOS) cannot receive OTA updates, affecting our ability to deploy bug fixes and features without app store releases.
Our Configuration
We've verified all our configuration is correct:
- ✅ Deployment keys match dashboard
- ✅ Server URL: https://app.revopush.org
- ✅ Native iOS configuration (Info.plist with CodePushDeploymentKey and CodePushServerURL)
- ✅ Native Android configuration (strings.xml with CodePushDeploymentKey and CodePushServerUrl)
- ✅ JavaScript configuration correct
- ✅ Environment variables loading properly
This appears to be a server-side routing or API compatibility issue. The API endpoint is returning the web application instead of the REST API response.
Request
Please investigate why the /v0.1/public/codepush/update_check endpoint is returning HTML instead of JSON, and provide guidance on:
- The correct API endpoint format for @revopush/react-native-code-push v1.5.0
- Required headers or authentication
- Whether we need to upgrade the library
- Any server-side issues you're aware of
Thank you for your help!
Muhammad Saqlain
muhammadsaqlain.qazi@cialfo.com.sg
Cialfo