-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crashing - RuntimeException: getParameters failed (empty parameters) #728
Comments
|
Observing same on Android |
Did @hponaganti @bensafeag manage to solve this just getting the exact same app failed QA testing because of it strange it only happens after the 3 x scan. Using Xamrian Forms 4.2.0.709249 Zxing .mobile .forms 2.4.1 09-28 15:37:54.285 D/AppCenterCrashes( 8983): Saving uncaught exception. 09-28 15:37:59.887 E/mono-rt ( 8983): [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.RuntimeException: getParameters failed (empty parameters) |
Thanks for reporting this issue! Unforunately it took me way too long to respond 😭. Sorry, I apologize! Recently the source code for this project was completely refactored to modernize it. Many PR's were included in this effort, and many bugs were hopefully fixed. Please try out the latest 3.x series of NuGet packages (currently in prerelease). To try and make the project more maintainable in my spare time going forward, I've decided to close all existing issues to start with a clean slate. If you're still experiencing this issue on the newest version, please open a new issue with as much detail as possible. Thank you for your patience and understanding! Happy scanning! |
The issue still exists in v3.0.0-beta5 (pre release) as well. |
I'm seeing this on v2.4.1. If you have a successful scan, set IsAnalyzing to false, navigate away from the scan page, then return and set IsAnalyzing to true again, then the camera window freezes. Tilting the phone to trigger a redraw causes the "getParameters() failed" error and the app crashes. I was able to work around this by resetting Content for the ContentView control that the ZXingScannerView is part of; i.e. { var tempContent = Content; Content = null; Content = tempContent; }, based on a comment I saw in another thread. I do this within the OnAppearing call and it seems to work reliably. |
Where in the OnAppearing did you add this code? Here is what I put in mine and it did not seem to help. I am assuming I have the code in the wrong place.
|
This looks similar to mine. The only significant difference I see is that mine is wrapped in Device.BeginInvokeOnMainThread(), which shouldn't be necessary anyways in OnAppearing.
BarcodeScanner is a custom control. The ResetScanning function is just
where ScanningEnabled is a property for the custom control. In the switch for my OnPropertyChanged I have:
Hope that helps. |
…ed (empty parameters) Redth#728
Still facing this issue in Android 10.0 |
also still facing this issue... Android 11.0 R .xaml
Almost Always with a ScannerView in the xaml. ScannerPages work fine. |
Has anyone found a solution yet? I am looking to solve this error for a couple of hours right now... maybe @MVanEester ? |
Unfortunately I'm having the same problem. I noticed that there are times when the reading is done very fast and it already causes the exception. Does anyone know how to solve? |
@jhonatansantos61 I tried to contact multiple developers working with Xamarin... also some real professionals. They were not able to fix it. It happens in situations you describe, but also when you want to go back to the page where the scanner is located. I think there is an issue with the package, seems like there is still no solution for it :( |
are there any news about this problem? EDIT: the only workaround that I found it's to remove the page that contains scan view from navigation stack. At the second time that I load that page, the scan works. |
I configured ZXing in the page builder and it worked correctl cameraQrCode.Options = new ZXing.Mobile.MobileBarcodeScanningOptions |
@lucamartiger could you explain how you removed the page from the navigation stack? It sounds like this is a great solution for this problem! |
yes, at the end I adopted this solution. thanks. |
Im facing similar problem on Zxing 3.1.0-beta2 combining ZXingScannerViewRenderer default with a ZXingScannerViewRenderer on Android and your workarround works like a charm. Thanks a lot @lucamartiger Also will be great if the issue is solved by the authors of the library |
Sorry, I didn't read very well your post and I didn't notice that there was a question. |
5 years this issue persists, and it's not acceptable for our applications to CRASHE violently in production :-( Related Issues : #728 #924 #1011 (and maybe more ? I stopped my search here...) A pull request #1002 has been kindly submitted by @rdfordatascience-ops (thanks ;-)) but has never been merged, accepted or included in a new version... So :
https://www.nuget.org/packages/Respawnsive.ZXing.Net.Mobile/ -> 1 hour, that's all what it takes to me... So I hope this will be usefull for some peoples... because the "real production world" is not focused on MAUI (not yet at least ;-)) |
Given that it has now been a couple of months since you made and published your fix, can you confirm if it has indeed resolved the problem as if so I will switch to your implementation. |
@MartinRobins yes, since I use my package, I just cleared all my applications crashes report in AppCenter. Just be carefull, I've removed completely Tizen/MacOS/UWP in this package ! But I'm always interested in feedback... if you use it, feel free to get back to me. Regards |
That is excellent news. I don't need Tizen/MacOS/UWP either, just Android and maybe iOS so that is perfect (and I promise not to hold you responsible either). Thanks for taking the time and effort, both for the fix and for responding to me. |
The app crashes when navigating away from the scanner page, then back to the scanner page. Also when changing the orientation by rotating the device a few times. I'm using FreshMVVM as an MVVM framework if that is relevant.
Usage:
Full stack trace: https://hastebin.com/ulequfucim.sql
The text was updated successfully, but these errors were encountered: