You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The app crashes (runtime error) when using okhttp3 in a worker:
import'globals';declareconstokhttp3: any;declareconstglobal;global.onmessage=function(msg){console.log('[WORKER] on message',msg);constclient=newokhttp3.OkHttpClient();console.log('[WORKER] created auth',msg.data.auth);constrequest=newokhttp3.Request.Builder().method(msg.data.method,null).header('Authorization',`Basic ${msg.data.auth}`).url(msg.data.url).build();console.log('[WORKER] built request',msg.data.url);constresponse=client.newCall(request).execute();global.postMessage(response.body().string());};
@binarious While using this test project with your code I was unable to reproduce the issue on my side so it might be also related to a specific API version.
Update: It seems that this is a known issue with the okhttp library so closing this one as not related to NativeScript.
Environment
Describe the bug
The app crashes (runtime error) when using okhttp3 in a worker:
Output:
Error message
okhttp3 has been added to the `app.gradle`:
The text was updated successfully, but these errors were encountered: