I am using Android WifiP2P service to make a group connection between 10 phones with one being the Host and others being Guests. I coded everything and it seems to be working fine when I test on API<=22, but on API 23 and higher I randomly get
E/AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiP2pService
Java.lang.IllegalArgumentException: Null device
The error occurs with no apparent trigger, and it happens randomly. Sometimes phones are able to communicate with no issues for almost 30 minutes, but sometimes it happens a couple of times in just a few minutes.
I am not sure what might be causing this. I would be very grateful if someone finds time and knowledge to help me with this issue. Thanks in advance!
This is a screenshot of the error.
Related
i am developing an Android app that communicates with Bluetooth sending and receiving raw commands on byte array.
Randomly the app crashes right after i send some of this command, with the following excepcion;
`Process: xxx.xxx.xxx, PID: 19983
java.lang.IndexOutOfBoundsException: 2, 1
at android.text.PackedIntVector.getValue(PackedIntVector.java:75)
at android.text.DynamicLayout.getLineTop(DynamicLayout.java:1010)
at android.text.Layout.getLineBottom(Layout.java:1725)
at android.widget.Editor.drawHardwareAcceleratedInner(Editor.java:2310)
at android.widget.Editor.drawHardwareAccelerated(Editor.java:2251)
at android.widget.Editor.onDraw(Editor.java:2191)
at android.widget.TextView.onDraw(TextView.java:8852)
at android.view.View.draw(View.java:23901)`
As i understand the problem is on the PackedIntVector.java class, but its an Android class and on the stack trace there isn`t any of my app files, all are from Android classes.
Does anybody know what could be happening? The excepcion always happen right after sending a command and not always happen, but i have not found any thtat triggers it, seems "random".
Thanks in advice!
For one of my project I work with Nearby Connection API with P2P_STAR strategy and I experience issue on discovery with Android 10.
I have tested with Huawei devices that resulted in no connection at all with host and on a freshly updated Xiaomi MI 9t who success to connect but disconnect few seconds after with no exceptions...
Before the update it work well on the Xiaomi.
Furthermore, my app work very well on my android 8 or 9 devices.
I tried to add ACCESS_FINE_LOCATION permission and update Google play services without success...
Our project repository : https://github.com/hbollon/Urbalog
All Nearby stuff is in NetworkHelper class and permissions list is in the constant REQUIRED_PERMISSIONS inside it.
Someone would have any idea?
Thanks in advance
So I have found the issue, on my android 10 devices I haven't activate location and Nearby seems unable to activate it itself...
I never notice that before Android 10 update so is it os related or have I always activated it before? I don't know ^^
However, on the ConnectionsStatusCodes documentation, MISSING_SETTING_LOCATION_MUST_BE_ON status code is marked as deprecated ( https://developers.google.com/android/reference/com/google/android/gms/nearby/connection/ConnectionsStatusCodes ).
So I imagine this is no longer a possible case no?
So I had my Android Emulator working perfectly fine yesterday and the day before, a Pixel 3a XL 28. Worked like a charm.
I restarted my computer and this morning, and now NONE of the emulators are working at all.
Early in the day, it was sort of working but it was extremely slow, and now it won't work at all.
I just get a blank white screen. My code is running, and I am just getting an error in my code that my database document doesn't exist, even though it does, and it takes a good minute or two to get to the database call in the first place. I am on a Mac OS.
I have an android phone that I just ran the code on, and it works like a charm.
FirebaseFirestore.getInstance()
.collection("Users")
.document("hjkyilk")
.get()
.addOnSuccessListener { result ->
...
}
.addOnFailureListener { exception ->
// Always hitting this, although this database DEFINITELY exists
println("User doesn't exist")
}
with this error:
2020-02-05 14:58:47.751 5504-5504/com.example.casualdatingapp E/ResourcesCompat: Failed to find font-family tag
2020-02-05 14:58:47.779 5504-5504/com.example.casualdatingapp E/ResourcesCompat: Failed to find font-family tag
2020-02-05 14:58:47.814 5504-5504/com.example.casualdatingapp E/ResourcesCompat: Failed to find font-family tag
2020-02-05 14:58:48.069 5504-5575/com.example.casualdatingapp E/FirebaseInstanceId: Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
2020-02-05 14:58:48.124 5504-5605/com.example.casualdatingapp E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
2020-02-05 14:58:49.803 5504-5504/com.example.casualdatingapp E/RecyclerView: No adapter attached; skipping layout
2020-02-05 14:58:49.842 5504-5575/com.example.casualdatingapp E/FirebaseInstanceId: Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
What in the world is going on here? I have tried cold booting, installing new OS/Emulators, wiping the data on the emulators, nothing is working.
EDIT: It's worth noting when it worked this morning, it wasn't able to pull or write to my database at all, but the data it was trying to write was stored somewhere else. My database was never updated, but when I opened the emulator, the new content was still there. I don't even know how that's possible.
Okay, so I had a completely separate virtual UNIX server running on my computer and apparently it was constantly killing the processes of the emulator...
Don't run more than 1 virtual server at a time.
Windows 8.1
Java ME SDK 8
Netbeans 8
Since downloading Netbeans a few days ago I've been having persistent problems. It's very slow and the the emulator starts up less than half the time. MosT of the time
I get An error once the emulator opens and it's about the begin running the program. It says:
Error Installing IMlet: See Device Log for Details. (see attachment)
The FATAL error message in the log is as follows:
[03:55:09.401] FATAL - lkit.ui.actions.AmsExecInstall - Unknown error: invalid url: file:///C:/Users/Kevins Home/Desktop/GPIOLEDTest/dist/GPIOLEDTest.jad (see attachment)
This problem also occurs on my girlfriends MAC using the same code + setup.
There's very little online material that seems to be relevant.
Would love to figure out what's wrong so I can finish this course: Develop Java Embedded Applications with a Raspberry Pi
The device Log:
I've tried moving the project to a path without spaces, alsl, but i still get the same error:
[04:40:10.688] FATAL - lkit.ui.actions.AmsExecInstall - Unknown error: invalid url: file:///C:/Users/Public/GPIOLEDTest/dist/GPIOLEDTest.jad
Thanks in advance
Reinstall. There are step by step instructions in this video, which is part of the course you are taking: http://youtu.be/tnC-nEwkdIg
I'm not sure exactly why it fixed the problem, but when I connected my external device ( a raspberry pi) to my laptop via an ethernet cable instead of doing it wirelessly the problem seemed to go away. My SSH must have been too weak to consistently run the emulator. Once it had a strong SSH through the ehternet cable the problem went away. If anyone knows more about exactly why this happened it be happy to hear..
download sdk 3.4 instead of sdk 8
I have two devices (Samsung Galaxy Tab 10 running 4.0.4 and Nexus 7 running 4.2.1). My application i am writing uses bindService/unbindService a service written within the same application to handle the constant managing of data regardless of activity state. Emulator/devices connected to the PC with USB debugging enabled work as expected. As soon as i unplug the the devices and try to the run the application stand-alone it doesn't error or exit or anything just doesn't bind so my log-in button doesn't work in my application until the bind is complete. This bind never completes and I have no idea why. Has anyone else experienced this?
I am including this for anyone who may run into this situation in the future. In my situation this was failing because the background service was waiting for a debugger thanks to android.os.waitForDebugger() and it was timing out. One line can screw your world up.. I had completely forgot that was in there.