kirillzyusko / react-native-wifi-p2p

Library that provide access for working with wi-fi direct (p2p) module in android.
164 stars 32 forks source link

App Crashing when clicking on Connect Button #27

Closed sharmakumaraditya closed 4 years ago

sharmakumaraditya commented 4 years ago

Whenever i am clicking the Connect , Create Group or Send Button the App is Crashing and when i am pressing other buttons nothing is happening, can anyone please help me with this. The app is crashing again and again and to no success i was able to fix it.

kirillzyusko commented 4 years ago

Hi @sharmakumaraditya

  1. Does your device support p2p feature? Are you sure, that wifi enabled, when you call createGroup?
  2. Did you call init method in the beginning?
  3. Could you capture logs via adb logcat and send them here as *.txt file?
sharmakumaraditya commented 4 years ago

link to the txt file : log.txt

  1. Yes my Device does support p2p

Thanks for the quick reply

kirillzyusko commented 4 years ago

It looks like state.devices is empty. Then state.devices[0].deviceAddress will give you an error. Am I correct?

sharmakumaraditya commented 4 years ago

I actually haven't checked that , i am just using this example https://github.com/kirillzyusko/react-native-wifi-p2p-example , i have just cloned this repo and actually i am trying to run this app.

kirillzyusko commented 4 years ago

Can you attach log when you do following:

  1. Open app
  2. Call createGroup
sharmakumaraditya commented 4 years ago

log.txt

This is the log file for create group

kirillzyusko commented 4 years ago

@sharmakumaraditya cool. But I see only JS logs. I'd like to see all logs (including Java). Could you please capture it via adb logcat comand?

sharmakumaraditya commented 4 years ago

Sure i got it, the app crashes when the create group is clicked more than once.