University-of-Potsdam-MM / Reflect.UP

Reflect.UP
GNU General Public License v3.0
2 stars 1 forks source link

Android Push Notifications #235

Closed ghost closed 5 years ago

ghost commented 5 years ago

Mit der App aus dem Store bekomme ich folgende Fehlermeldung

2019-04-08 14:17:37.499 9289-9289/? I/chromium: [INFO:CONSOLE(0)] "Access to XMLHttpRequest at 'https://apiup.uni-potsdam.de/endpoints/pushAPI/2.0/api/v2/tokens/' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.", source: http://localhost:8080/ (0)

2019-04-08 14:17:37.500 9289-9289/? I/chromium: [INFO:CONSOLE(1)] "(subscribe): error while contacting the push server: Http failure response for (unknown url): 0 Unknown Error", source: http://localhost:8080/build/main.js (1)

ghost commented 5 years ago

https://ionicframework.com/docs/faq/cors

WebView Plugin 2.x on Cordova

iOS/Android: http://localhost:8080/

WebView Plugin 3.x on Cordova

iOS: ionic://localhost Android: http://localhost/

Ich habe gesehen, dass das WebView Plugin fehlt, aber weiß nicht, ob das der Fehler sein kann. Jetzt ist Version 4 installiert: https://github.com/ionic-team/cordova-plugin-ionic-webview

alekiy commented 5 years ago

@lkstnr Aus der App mittels ionic serve oder bekommst du den Fehler über adb logcat?

ghost commented 5 years ago

@alekiy App aus dem Store geladen, dann an den PC angeschlossen und über Android Studio den Log ausgelesen.

Habe mich aber auch gewundert, dass auf dem Gerät was mit CORS kommt.

alekiy commented 5 years ago
alekiy commented 5 years ago

Response to preflight request doesn't pass access control check: It does not have HTTP ok status ....hm....das müssen wir uns zusammen ansehen...

ghost commented 5 years ago

Der gleiche Fehler tritt bei Jenissa‘s Handy auf, also scheint das das Problem zu sein.

alekiy commented 5 years ago

@lkstnr Wir müssen morgen mal auf den Status achten: Im Log erscheinen Fehler wie diese hier:

ghost commented 5 years ago

Failure in SSL library, usually a protocol error

Noch mehr aus dem Log von Jenny, direkt bevor unsere Fehlermeldung kommt

2019-04-11 14:50:49.391 3982-4087/? E/Optly.datafileHandler: Error making request javax.net.ssl.SSLHandshakeException: Handshake failed at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@16089017@16.0.89 (040306-239467275):35) at com.android.okhttp.Connection.connectTls(Connection.java:309) at com.android.okhttp.Connection.connectSocket(Connection.java:272) at com.android.okhttp.Connection.connect(Connection.java:240) at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:444) at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:133) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:368) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:285) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:474) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:139) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java) at com.optimizely.ab.android.datafile_handler.DatafileClient$1.execute(DatafileClient.java:82) at com.optimizely.ab.android.datafile_handler.DatafileClient$1.execute(DatafileClient.java:66) at com.optimizely.ab.android.shared.Client.execute(Client.java:143) at com.optimizely.ab.android.datafile_handler.DatafileClient.request(DatafileClient.java:111) at com.optimizely.ab.android.datafile_handler.DatafileLoader$RequestDatafileFromClientTask.doInBackground(DatafileLoader.java:146) at com.optimizely.ab.android.datafile_handler.DatafileLoader$RequestDatafileFromClientTask.doInBackground(DatafileLoader.java:118) at android.os.AsyncTask$2.call(AsyncTask.java:304) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed ... 23 more Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed ... 23 more Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xa9004318: Failure in SSL library, usually a protocol error error:1000043e:SSL routines:OPENSSL_internal:TLSV1_ALERT_INAPPROPRIATE_FALLBACK (third_party/openssl/boringssl/src/ssl/tls_record.cc:587 0xa9040c88:0x00000001) at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@16089017@16.0.89 (040306-239467275):7) at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@16089017@16.0.89 (040306-239467275):14) ... 22 more Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xa9004318: Failure in SSL library, usually a protocol error error:1000043e:SSL routines:OPENSSL_internal:TLSV1_ALERT_INAPPROPRIATE_FALLBACK (third_party/openssl/boringssl/src/ssl/tls_record.cc:587 0xa9040dc8:0x00000001) at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@16089017@16.0.89 (040306-239467275):7) at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@16089017@16.0.89 (040306-239467275):14) ... 22 more Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xa9004318: Failure in SSL library, usually a protocol error error:1000043e:SSL routines:OPENSSL_internal:TLSV1_ALERT_INAPPROPRIATE_FALLBACK (third_party/openssl/boringssl/src/ssl/tls_record.cc:587 0xa9040f08:0x00000001) at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(

ghost commented 5 years ago

Der Fehler von oben ist behoben, aber #232 bleibt.