Closed einsteinarbert closed 5 years ago
tombstone_00.txt Here is my dump tomstone file for crash
Update, my log Symbolized file:
********** Crash dump: **********
Build fingerprint: 'samsung/gracerltexx/gracerlte:8.0.0/R16NW/N935FXXS4BRK2:user/release-keys'
pid: 19552, tid: 19680, name: pool-1-thread-1 >>> org.appspot.apprtc <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame #00 pc 00498e2e /data/app/org.appspot.apprtc-rNtF587UXMPHjh_xQ4YHUQ==/lib/arm/libjingle_peerconnection_so.so (offset 0x145000) (Java_org_webrtc_PeerConnection_nativeCreateDataChannel+49): Routine webrtc::jni::JNI_PeerConnection_CreateDataChannel(_JNIEnv*, webrtc::JavaParamRef<_jobject*> const&, webrtc::JavaParamRef<_jstring*> const&, webrtc::JavaParamRef<_jobject*> const&) at /media/huyen/Data/workspace/src/out/Debug/../../sdk/android/src/jni/pc/peerconnection.cc:432
Stack frame #01 pc 0000f30f /data/app/org.appspot.apprtc-rNtF587UXMPHjh_xQ4YHUQ==/oat/arm/base.odex (offset 0xa000)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'samsung/gracerltexx/gracerlte:8.0.0/R16NW/N935FXXS4BRK2:user/release-keys'
pid: 19894, tid: 19954, name: pool-1-thread-1 >>> org.appspot.apprtc <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame #00 pc 00498e2e /data/app/org.appspot.apprtc-rNtF587UXMPHjh_xQ4YHUQ==/lib/arm/libjingle_peerconnection_so.so (offset 0x145000) (Java_org_webrtc_PeerConnection_nativeCreateDataChannel+49): Routine webrtc::jni::JNI_PeerConnection_CreateDataChannel(_JNIEnv*, webrtc::JavaParamRef<_jobject*> const&, webrtc::JavaParamRef<_jstring*> const&, webrtc::JavaParamRef<_jobject*> const&) at /media/huyen/Data/workspace/src/out/Debug/../../sdk/android/src/jni/pc/peerconnection.cc:432
Stack frame #01 pc 0000f30f /data/app/org.appspot.apprtc-rNtF587UXMPHjh_xQ4YHUQ==/oat/arm/base.odex (offset 0xa000)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'samsung/gracerltexx/gracerlte:8.0.0/R16NW/N935FXXS4BRK2:user/release-keys'
pid: 20099, tid: 20144, name: pool-1-thread-1 >>> org.appspot.apprtc <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame #00 pc 00498e2e /data/app/org.appspot.apprtc-rNtF587UXMPHjh_xQ4YHUQ==/lib/arm/libjingle_peerconnection_so.so (offset 0x145000) (Java_org_webrtc_PeerConnection_nativeCreateDataChannel+49): Routine webrtc::jni::JNI_PeerConnection_CreateDataChannel(_JNIEnv*, webrtc::JavaParamRef<_jobject*> const&, webrtc::JavaParamRef<_jstring*> const&, webrtc::JavaParamRef<_jobject*> const&) at /media/huyen/Data/workspace/src/out/Debug/../../sdk/android/src/jni/pc/peerconnection.cc:432
Stack frame #01 pc 0000f30f /data/app/org.appspot.apprtc-rNtF587UXMPHjh_xQ4YHUQ==/oat/arm/base.odex (offset 0xa000)
Update: I found the reason in my collinder log (my server using stunnel for has https) http: TLS handshake error connection reset by peer.
Now I can run SSL on port 443 with this command, but Android still can't connect
nohup /root/uav-project/gooogleSDK/google-cloud-sdk/bin/dev_appserver.py --ssl_certificate_path /root/new.crt --ssl_certificate_key_path /root/key.pem --enable_host_checking false --dev_appserver_log_level info --specified_service_ports default:442 --host my_domain.com --port 8080 /root/apprtc/out/app_engine/ &
When Android connect, it report error:
2019-04-09 22:37:43.415 11589-11971/org.appspot.apprtc E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1
Process: org.appspot.apprtc, PID: 11589
java.lang.NullPointerException: Attempt to invoke virtual method 'org.webrtc.DataChannel org.webrtc.PeerConnection.createDataChannel(java.lang.String, org.webrtc.DataChannel$Init)' on a null object reference
at org.appspot.apprtc.PeerConnectionClient.createPeerConnectionInternal(PeerConnectionClient.java:618)
at org.appspot.apprtc.PeerConnectionClient.access$500(PeerConnectionClient.java:72)
at org.appspot.apprtc.PeerConnectionClient$2.run(PeerConnectionClient.java:357)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
any one hereeee? please help, I cant' do anything @@
2019-04-24 21:33:00.592 18668-18668/org.appspot.apprtc E/ViewRootImpl: sendUserActionEvent() returned.
2019-04-24 21:33:15.037 18668-18969/org.appspot.apprtc E/PCRTCClient: Peerconnection error: Failed to create peer connection: Attempt to invoke virtual method 'org.webrtc.DataChannel org.webrtc.PeerConnection.createDataChannel(java.lang.String, org.webrtc.DataChannel$Init)' on a null object reference
2019-04-24 21:33:15.039 18668-18969/org.appspot.apprtc E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
Process: org.appspot.apprtc, PID: 18668
java.lang.NullPointerException: Attempt to invoke virtual method 'org.webrtc.DataChannel org.webrtc.PeerConnection.createDataChannel(java.lang.String, org.webrtc.DataChannel$Init)' on a null object reference
at org.appspot.apprtc.PeerConnectionClient.createPeerConnectionInternal(PeerConnectionClient.java:587)
at org.appspot.apprtc.PeerConnectionClient.lambda$createPeerConnection$2$PeerConnectionClient(PeerConnectionClient.java:377)
at org.appspot.apprtc.-$$Lambda$PeerConnectionClient$DxSWe8xIrScS-NNI7idUmv1-Yqk.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-04-24 21:33:15.156 18668-18668/org.appspot.apprtc E/AppRTCMobileActivity: Fatal error: Attempt to invoke virtual method 'org.webrtc.DataChannel org.webrtc.PeerConnection.createDataChannel(java.lang.String, org.webrtc.DataChannel$Init)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'org.webrtc.DataChannel org.webrtc.PeerConnection.createDataChannel(java.lang.String, org.webrtc.DataChannel$Init)' on a null object reference
at org.appspot.apprtc.PeerConnectionClient.createPeerConnectionInternal(PeerConnectionClient.java:587)
at org.appspot.apprtc.PeerConnectionClient.lambda$createPeerConnection$2$PeerConnectionClient(PeerConnectionClient.java:377)
at org.appspot.apprtc.-$$Lambda$PeerConnectionClient$DxSWe8xIrScS-NNI7idUmv1-Yqk.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-04-26 00:24:02.401 8421-8786/org.appspot.apprtc D/PCRTCClient: Create peer connection.
2019-04-26 00:24:02.407 8421-8786/org.appspot.apprtc E/PCRTCClient: Peerconnection error: Failed to create peer connection: Attempt to invoke virtual method 'org.webrtc.RtpSender org.webrtc.PeerConnection.addTrack(org.webrtc.MediaStreamTrack, java.util.List)' on a null object reference
2019-04-26 00:24:02.409 8421-8786/org.appspot.apprtc E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-2
Process: org.appspot.apprtc, PID: 8421
java.lang.NullPointerException: Attempt to invoke virtual method 'org.webrtc.RtpSender org.webrtc.PeerConnection.addTrack(org.webrtc.MediaStreamTrack, java.util.List)' on a null object reference
at org.appspot.apprtc.PeerConnectionClient.createPeerConnectionInternal(PeerConnectionClient.java:606)
at org.appspot.apprtc.PeerConnectionClient.lambda$createPeerConnection$2$PeerConnectionClient(PeerConnectionClient.java:377)
at org.appspot.apprtc.-$$Lambda$PeerConnectionClient$DxSWe8xIrScS-NNI7idUmv1-Yqk.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-04-26 00:24:02.410 8421-8421/org.appspot.apprtc D/ViewRootImpl@47a073b[CallActivity]: MSG_RESIZED_REPORT: frame=[0,0][720,1280] ci=[0,0][0,0] vi=[0,42][0,0] or=1
2019-04-26 00:24:02.410 8421-8421/org.appspot.apprtc D/ViewRootImpl@23246e[Toast]: MSG_RESIZED_REPORT: frame=[94,674][626,751] ci=[0,0][0,0] vi=[0,0][0,0] or=1
2019-04-26 00:24:02.410 8421-8421/org.appspot.apprtc D/ViewRootImpl@47a073b[CallActivity]: MSG_RESIZED: frame=[0,0][720,1280] ci=[0,0][0,0] vi=[0,42][0,417] or=1
2019-04-26 00:24:02.413 8421-8442/org.appspot.apprtc W/libEGL: EGLNativeWindowType 0x7832ac2010 disconnect failed
2019-04-26 00:24:02.413 8421-8442/org.appspot.apprtc D/OpenGLRenderer: eglDestroySurface = 0x783cbffa80, 0x7832ac2000
2019-04-26 00:24:02.413 8421-8421/org.appspot.apprtc D/ViewRootImpl@23246e[Toast]: dispatchDetachedFromWindow
2019-04-26 00:24:02.427 8421-8421/org.appspot.apprtc D/InputTransport: Input channel destroyed: fd=119
2019-04-26 00:24:02.445 8421-8421/org.appspot.apprtc D/ViewRootImpl@24e0294[CallActivity]: Relayout returned: old=[0,42][720,1280] new=[40,434][680,888] result=0x7 surface={true 516246216704} changed=true
2019-04-26 00:24:02.449 8421-8442/org.appspot.apprtc D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000, [640x454]-format:1
2019-04-26 00:24:02.449 8421-8442/org.appspot.apprtc D/OpenGLRenderer: eglCreateWindowSurface = 0x783cbffa80, 0x7832ac2010
2019-04-26 00:24:02.453 8421-8421/org.appspot.apprtc D/ScrollView: onsize change changed
2019-04-26 00:24:02.455 8421-8421/org.appspot.apprtc I/SurfaceViewRenderer: fullscreen_video_view: onMeasure(). New size: 720x1280
2019-04-26 00:24:02.456 8421-8421/org.appspot.apprtc I/SurfaceViewRenderer: pip_video_view: onMeasure(). New size: 664x252
2019-04-26 00:24:02.466 8421-8421/org.appspot.apprtc D/ViewRootImpl@47a073b[CallActivity]: Relayout returned: old=[0,0][720,1280] new=[0,0][720,1280] result=0x1 surface={true 516642381824} changed=false
2019-04-26 00:24:02.467 8421-8421/org.appspot.apprtc I/EglRenderer: fullscreen_video_viewsetLayoutAspectRatio: 0.5625
2019-04-26 00:24:02.467 8421-8421/org.appspot.apprtc I/EglRenderer: pip_video_viewsetLayoutAspectRatio: 2.6349206
2019-04-26 00:24:02.475 8421-8421/org.appspot.apprtc D/ViewRootImpl@47a073b[CallActivity]: MSG_RESIZED: frame=[0,0][720,1280] ci=[0,0][0,0] vi=[0,42][0,0] or=1
2019-04-26 00:24:02.475 8421-8421/org.appspot.apprtc D/ViewRootImpl@24e0294[CallActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2019-04-26 00:24:02.479 8421-8421/org.appspot.apprtc D/ScrollView: initGoToTop
2019-04-26 00:24:02.480 8421-8421/org.appspot.apprtc E/AppRTCMobileActivity: Fatal error: Attempt to invoke virtual method 'org.webrtc.RtpSender org.webrtc.PeerConnection.addTrack(org.webrtc.MediaStreamTrack, java.util.List)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'org.webrtc.RtpSender org.webrtc.PeerConnection.addTrack(org.webrtc.MediaStreamTrack, java.util.List)' on a null object reference
at org.appspot.apprtc.PeerConnectionClient.createPeerConnectionInternal(PeerConnectionClient.java:606)
at org.appspot.apprtc.PeerConnectionClient.lambda$createPeerConnection$2$PeerConnectionClient(PeerConnectionClient.java:377)
at org.appspot.apprtc.-$$Lambda$PeerConnectionClient$DxSWe8xIrScS-NNI7idUmv1-Yqk.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-04-26 00:24:02.481 8421-8421/org.appspot.apprtc D/Dialog: mIsSamsungBasicInteraction = false
2019-04-26 00:24:02.481 8421-8421/org.appspot.apprtc D/Dialog: mIsSamsungBasicInteraction = false, isMetaDataInActivity = false
2019-04-26 00:24:02.484 8421-8421/org.appspot.apprtc I/DecorView: createDecorCaptionView >> DecorView@32f102c[], isFloating: true, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: false
2019-04-26 00:24:02.492 8421-8421/org.appspot.apprtc D/ScrollView: initGoToTop
2019-04-26 00:24:02.510 8421-8421/org.appspot.apprtc D/InputTransport: Input channel constructed: fd=138
2019-04-26 00:24:02.511 8421-8421/org.appspot.apprtc D/ViewRootImpl@df2f7d7[CallActivity]: setView = DecorView@32f102c[CallActivity] TM=true MM=false
2019-04-26 00:24:02.524 8421-8421/org.appspot.apprtc D/InputTransport: Input channel constructed: fd=146
2019-04-26 00:24:02.525 8421-8421/org.appspot.apprtc D/ViewRootImpl@5ca46e2[Toast]: setView = android.widget.LinearLayout{d853a73 V.E...... ......I. 0,0-0,0} TM=true MM=false
2019-04-26 00:24:02.542 8421-8421/org.appspot.apprtc W/StaticLayout: maxLineHeight should not be -1. maxLines:2 lineCount:2
2019-04-26 00:24:02.547 8421-8421/org.appspot.apprtc I/chatty: uid=10040(org.appspot.apprtc) identical 7 lines
Ok, finnaly again I answered for my self
# Copyright 2015 Google Inc. All Rights Reserved.
"""AppRTC Constants.
This module contains the constants used in AppRTC Python modules.
"""
import os
# Deprecated domains which we should to redirect to REDIRECT_URL.
REDIRECT_DOMAINS = [
'apprtc.appspot.com', 'apprtc.webrtc.org', 'www.appr.tc'
]
# URL which we should redirect to if matching in REDIRECT_DOMAINS.
REDIRECT_URL = 'https://appr.tc'
ROOM_MEMCACHE_EXPIRATION_SEC = 60 * 60 * 24
MEMCACHE_RETRY_LIMIT = 100
LOOPBACK_CLIENT_ID = 'LOOPBACK_CLIENT_ID'
# Turn/Stun server override. This allows AppRTC to connect to turn servers
# directly rather than retrieving them from an ICE server provider.
#ICE_SERVER_OVERRIDE = None
# Enable by uncomment below and comment out above, then specify turn and stun
ICE_SERVER_OVERRIDE = [
{
"urls": "turn:my_ipaddr:port?transport=udp",
"username": "my_user_name",
"credential": "my_paswd"
},
{
"urls": "turn:my_ipaddr:port?transport=tcp",
"username": "my_user_name",
"credential": "my_paswd"
}
]
ICE_SERVER_BASE_URL = ''
ICE_SERVER_URL_TEMPLATE = ''
ICE_SERVER_API_KEY = os.environ.get('')
# Dictionary keys in the collider instance info constant.
WSS_INSTANCE_HOST_KEY = 'my_ipaddr:8443'
WSS_INSTANCE_NAME_KEY = 'wsserver-std'
WSS_INSTANCE_ZONE_KEY = 'us-central1-a'
WSS_INSTANCES = [{
WSS_INSTANCE_HOST_KEY: 'my_ipaddr:8443',
WSS_INSTANCE_NAME_KEY: 'collinder-2',
WSS_INSTANCE_ZONE_KEY: 'vn-nhanhoa-02'
}, {
WSS_INSTANCE_HOST_KEY: 'my_ipaddr:8443',
WSS_INSTANCE_NAME_KEY: 'collinder-1',
WSS_INSTANCE_ZONE_KEY: 'vn-nhanhoa-01'
}]
WSS_HOST_PORT_PAIRS = [ins[WSS_INSTANCE_HOST_KEY] for ins in WSS_INSTANCES]
# memcache key for the active collider host.
WSS_HOST_ACTIVE_HOST_KEY = 'my_ipaddr:8443'
# Dictionary keys in the collider probing result.
WSS_HOST_IS_UP_KEY = 'is_up'
WSS_HOST_STATUS_CODE_KEY = 'status_code'
WSS_HOST_ERROR_MESSAGE_KEY = 'error_message'
RESPONSE_ERROR = 'ERROR'
RESPONSE_ROOM_FULL = 'FULL'
RESPONSE_UNKNOWN_ROOM = 'UNKNOWN_ROOM'
RESPONSE_UNKNOWN_CLIENT = 'UNKNOWN_CLIENT'
RESPONSE_DUPLICATE_CLIENT = 'DUPLICATE_CLIENT'
RESPONSE_SUCCESS = 'SUCCESS'
RESPONSE_INVALID_REQUEST = 'INVALID_REQUEST'
IS_DEV_SERVER = os.environ.get('APPLICATION_ID', '').startswith('dev')
BIGQUERY_URL = 'https://www.googleapis.com/auth/bigquery'
# Dataset used in production.
BIGQUERY_DATASET_PROD = 'prod'
# Dataset used when running locally.
BIGQUERY_DATASET_LOCAL = 'dev'
# BigQuery table within the dataset.
BIGQUERY_TABLE = 'analytics'
Be attention at this config:
ICE_SERVER_OVERRIDE = [
{
"urls": "turn:my_ipaddr:port?transport=udp",
"username": "my_user_name",
"credential": "my_paswd"
},
{
"urls": "turn:my_ipaddr:port?transport=tcp",
"username": "my_user_name",
"credential": "my_paswd"
}
]
There are some error when read url in android application: org/appspot/apprtc/RoomParametersFetcher.java
// Return the list of ICE servers described by a WebRTCPeerConnection
// configuration string.
private List<PeerConnection.IceServer> iceServersFromPCConfigJSON(String pcConfig)
throws JSONException {
JSONObject json = new JSONObject(pcConfig);
JSONArray servers = json.getJSONArray("iceServers");
List<PeerConnection.IceServer> ret = new ArrayList<>();
for (int i = 0; i < servers.length(); ++i) {
JSONObject server = servers.getJSONObject(i);
String url = server.getString("urls");
String credential = server.has("credential") ? server.getString("credential") : "";
PeerConnection.IceServer turnServer =
PeerConnection.IceServer.builder(url)
.setPassword(credential)
.createIceServer();
ret.add(turnServer);
}
return ret;
}
I edit that when found error because now webrtc can build on android studio :))
private List<PeerConnection.IceServer> iceServersFromPCConfigJSON(String pcConfig)
throws JSONException {
JSONObject json = new JSONObject(pcConfig);
JSONArray servers = json.getJSONArray("iceServers");
List<PeerConnection.IceServer> ret = new ArrayList<>();
for (int i = 0; i < servers.length(); ++i) {
JSONObject server = servers.getJSONObject(i);
String url = server.getString("urls");
String credential = server.has("credential") ? server.getString("credential") : "";
// I ADDED THAT LINE:
String username = server.has("username") ? server.getString("username") : "";
PeerConnection.IceServer turnServer =
PeerConnection.IceServer.builder(url).setTlsCertPolicy(PeerConnection.TlsCertPolicy.TLS_CERT_POLICY_SECURE)
.setPassword(credential)
.setUsername(username)
.createIceServer();
ret.add(turnServer);
}
return ret;
}
Now my server cann allow connect even when via 3G mobile network <3 <3
@einsteinarbert Thank you.
@einsteinarbert Hi, are you still working on it? The problems that you tackled are what I try to solve now, so I could solve most of my issue from your posts. Thank you for your contributions.
When I connect via chrome with my website run apprtc code, it work, but in android app it crash in lib C++, here is full logcat of Android (android app connect to appr.tc work in normal):