openshopio / openshop.io-android

OpenShop.io
http://openshop.io
MIT License
503 stars 350 forks source link

Server failed #60

Closed sonic760408 closed 6 years ago

sonic760408 commented 6 years ago

Dear author:

I set up the properties, try to compile and run this app, but when after showing welcome screen, the app crash And I try to trace the root cause, find the error message is following

11-17 17:21:36.938 3449-3525/bf.io.openshop E/Volley: [202] BasicNetwork.performRequest: Unexpected response code 500 for http://77.93.198.186/v1.2/10/shops
11-17 17:21:36.938 3449-3525/bf.io.openshop E/GsonRequest: GsonRequest URL: http://77.93.198.186/v1.2/10/shops. ERROR: <!DOCTYPE html><!-- "' --></script></style></noscript></xmp>
                                                           <meta charset="utf-8">
                                                           <meta name=robots content=noindex>
                                                           <meta name=generator content="Tracy">
                                                           <title>Server Error</title>

                                                           <style>
                                                            #tracy-error { background: white; width: 500px; margin: 70px auto; padding: 10px 20px }
                                                            #tracy-error h1 { font: bold 47px/1.5 sans-serif; background: none; color: #333; margin: .6em 0 }
                                                            #tracy-error p { font: 21px/1.5 Georgia,serif; background: none; color: #333; margin: 1.5em 0 }
                                                            #tracy-error small { font-size: 70%; color: gray }
                                                           </style>

                                                           <div id=tracy-error>
                                                            <h1>Server Error</h1>

                                                            <p>We're sorry! The server encountered an internal error and
                                                            was unable to complete your request. Please try again later.</p>

                                                            <p><small>error 500<br>Tracy is unable to log error.</small></p>
                                                           </div>
11-17 17:21:36.940 3449-3449/bf.io.openshop E/MsgUtils: Cannot parse error message
                                                        org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
                                                            at org.json.JSON.typeMismatch(JSON.java:111)
                                                            at org.json.JSONObject.<init>(JSONObject.java:160)
                                                            at org.json.JSONObject.<init>(JSONObject.java:173)
                                                            at bf.io.openshop.utils.MsgUtils.logAndShowErrorMessage(MsgUtils.java:41)
                                                            at bf.io.openshop.ux.SplashActivity$7.onErrorResponse(SplashActivity.java:349)
                                                            at com.android.volley.Request.deliverError(Request.java:564)
                                                            at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:101)
                                                            at android.os.Handler.handleCallback(Handler.java:751)
                                                            at android.os.Handler.dispatchMessage(Handler.java:95)
                                                            at android.os.Looper.loop(Looper.java:154)
                                                            at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

And I tried to line http://77.93.198.186/v1.2, shows page not found Is this server already shutting down?

Thank you

faroooq commented 6 years ago

me too same error..

praveensule commented 6 years ago

Same here

arthuravner commented 6 years ago

me too...

campyncheezy commented 6 years ago

throw new InvalidUserDataException("You should define KEYSTORE_PASSWORD, KEYSTORE_ALIAS and KEY_PASSWORD in gradle.properties." + ex) .. I have an error with this line of code. can you help me?

lucaardito commented 6 years ago

In app build.gradle comment this try/catch

signingConfigs { release { / try { storeFile file("openshopKeystore.jks") storePassword KEYSTORE_PASSWORD keyAlias KEYSTORE_ALIAS keyPassword KEY_PASSWORD } catch (ex) { throw new InvalidUserDataException("You should define KEYSTORE_PASSWORD, KEYSTORE_ALIAS and KEY_PASSWORD in gradle.properties." + ex) } /} }

and in release comment signingConfig signingConfigs.release

release { minifyEnabled false debuggable false //signingConfig signingConfigs.release

        // For release build should be added custom proGuard

// minifyEnabled true // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }

the problem now is related to the backend... apparently it disappeared.

ZelvaJan commented 6 years ago

Partially solved by connecting to apiary mock server https://bfashionapibfversion.docs.apiary.io/# Generally speaking this is just mobile aplication, you have to write your own server which will handle all the logic ad data for specific store.