Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NetworkOnMainThreadException #2

Copy link
Copy link

Description

@mondoktamas
Issue body actions

I've tried to start this demo, but cannot login (some SSL problem).
After that i've started the chat server example in my local machine, and i could login, but when i try send a message the app crashes with NOMTE

android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1303) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) at java.net.SocketOutputStream.write(SocketOutputStream.java:157) at okio.Okio$1.write(Okio.java:78) at okio.AsyncTimeout$1.write(AsyncTimeout.java:180) at okio.RealBufferedSink.emit(RealBufferedSink.java:178) at okhttp3.internal.ws.WebSocketWriter.writeMessageFrameSynchronized(WebSocketWriter.java:211) at okhttp3.internal.ws.WebSocketWriter.access$600(WebSocketWriter.java:47) at okhttp3.internal.ws.WebSocketWriter$FrameSink.close(WebSocketWriter.java:271) at okio.RealBufferedSink.close(RealBufferedSink.java:236) at okhttp3.internal.ws.RealWebSocket.sendMessage(RealWebSocket.java:131) at org.phoenixframework.channels.Socket.push(Socket.java:290) at org.phoenixframework.channels.Push.send(Push.java:165) at org.phoenixframework.channels.Channel.push(Channel.java:201) at org.phoenixframework.channels.Channel.push(Channel.java:209) at com.github.eoinsha.javaphoenixchannels.sample.chat.ChatActivity.sendMessage(ChatActivity.java:157) at com.github.eoinsha.javaphoenixchannels.sample.chat.ChatActivity.access$900(ChatActivity.java:35) at com.github.eoinsha.javaphoenixchannels.sample.chat.ChatActivity$3$4.onClick(ChatActivity.java:118) at android.view.View.performClick(View.java:5637) at android.view.View$PerformClick.run(View.java:22429) 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)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.