Comments (7)
Just wanted to drop a note that 2.7.0 has fixed the issue for us - many thanks!
from react-native-exception-handler.
Ok. How about this . So currently to customise native Exception handling we have a function mentioned at this part of the README
Modifying iOS Native Exception handler UI (NATIVE CODE HAS TO BE WRITTEN) recommended that you do this in XCode
Maybe we can add a extra parameter to the block that is passed to
ReactNativeExceptionHandler replaceNativeExceptionHandlerBlock
Currently it takes a block that accepts two parameters replaceNativeExceptionHandlerBlock:^(NSException *exception, NSString *readeableException)
Maybe we can add another parameter to it like so
replaceNativeExceptionHandlerBlock:^(NSException *exception, NSString *readeableException, int signal){
if(signal === SIGPIPE){
//ignore and do nothing
}else{
//show popup
}
}
So If anyone wants to handle/ignore any custom signal, then they can do so inside this callback itself.
So essentially
When SIGPIPE occurs the custom block specified by the user will be called and they can choose to handle/ignore it safely.
What do you say ? @pesterhazy
from react-native-exception-handler.
Sounds like a good general solution. Two comments:
- It would be great if there was a way to call the original error handler, so we don't have to copy and paste the
UIAlertController
call (not necessary of course, I'm just reluctant to copy and paste too much) - Perhaps it would be a good default to ignore SIGPIPE, which can be considered an informational signal. For iOS apps, IMO it usually doesn't make sense to crash as a response to it
For reference, here are a few links discussing SIGPIPE on iOS:
- https://stackoverflow.com/questions/32197319/network-code-stopping-with-sigpipe/32197674#32197674
- golang/go#17393
- mumble-voip/mumblekit#47 (comment)
from react-native-exception-handler.
Okay . So I think i will remove the SIGPIPE handler all together. What do you think ?
from react-native-exception-handler.
from react-native-exception-handler.
To add one more data point in support of remove the SIGPIPE handler, attaching a debugger it looks like in our app the SIGPIPE occurs within UIKit, so this probably affects a lot of people, not just those with native code added.
from react-native-exception-handler.
Release v2.7.0 - It has the fix for this.
Thanks @pesterhazy
from react-native-exception-handler.
Related Issues (20)
- How to custom replaceNativeExceptionHandlerBlock on ios with wix/react-native-navigation
- Android not sending fetch in setNativeExceptionHandler HOT 6
- warning and error is not fatal ?
- Not Working with crashlytics HOT 3
- Error not captured: ReferenceError: variable is not defined
- What's the technical reason native exception can't be reported to JS as events?
- Navigate to Contact us screen HOT 1
- change readme to show "deprecated" status
- Question: how to mock? HOT 1
- Is it possible to restart the application from the modal?
- Maximum call stack size exceeded (native stack depth)
- Get ride of default alert when app crash [Android]
- JS Code not beign called on Native Exception Android HOT 1
- Fetch operations not working inside nativehandler HOT 2
- Write log into device memory
- Add example for native Code in Android example
- [QUESTION] Is this library deprecated? HOT 5
- Unable to obtain incorrect message HOT 1
- "Occured" should be "Occurred"
- DefaultErrorScreen in android is not showing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-exception-handler.