Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

android server 500 APP collapse #155

Closed
GuoDapeng opened this issue May 12, 2016 · 4 comments
Closed

android server 500 APP collapse #155

GuoDapeng opened this issue May 12, 2016 · 4 comments

Comments

@GuoDapeng
Copy link

'''
05-13 02:45:02.970 9298-9442/? E/AndroidRuntime: FATAL EXCEPTION: Thread-1157
Process: com.easycloud.LazyCityBusiness, PID: 9298
java.lang.NullPointerException
at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.run(UpdateLoaderWorker.java:80)
at com.nordnetab.chcp.main.updater.UpdatesLoader$1.run(UpdatesLoader.java:60)
at java.lang.Thread.run(Thread.java:841)
'''

'''
// check if there is a new content version available
if (newAppConfig.getContentConfig().getReleaseVersion().equals(oldAppConfig.getContentConfig().getReleaseVersion())) {
setNothingToUpdateResult(newAppConfig);
return;
}
'''

newAppConfig.getContentConfig().getReleaseVersion() is null

@nikDemyankov
Copy link
Member

It's weird, since if server gave 500 - app should have failed to download config. Maybe it did download the chcp.json file, but it has no release preference?

@GuoDapeng
Copy link
Author

thinkphp error Message cause bug

In the following manner to solve the problem of collapse

UpdateLoaderWorker

    // download new application config
    ApplicationConfig newAppConfig = downloadApplicationConfig();
    if (newAppConfig == null) {
        setErrorResult(ChcpError.FAILED_TO_DOWNLOAD_APPLICATION_CONFIG, null);
        return;
    }

    String newVersion = newAppConfig.getContentConfig().getReleaseVersion();
    if (newVersion == null) {
        setErrorResult(ChcpError.FAILED_TO_DOWNLOAD_APPLICATION_CONFIG, null);
        return;
    }

@nikDemyankov
Copy link
Member

Agree, wanted to add similar code. Just want to make sure, that it's not a problem in the chcp.json file, that is placed on the server.

@nikDemyankov
Copy link
Member

Released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants