Comments (5)
Thanks for the bug report. I will take a look this weekend.
from securexpc.
After some digging it seems that errors I was seeing were mapped to the client errors.
What we're seeing here: BatFi, the app has a timer that sends messages and fails. Then I killed the application, and helper's errorHandler
was called.
from securexpc.
Could you provide the actual code or some description of the code involved that's causing this behavior?
Does BatFi
contain usage of XPCClient
and BatFiHelper
have an XPCServer
? That's what I'd assume based on typical helper patterns using XPC, but it's surprising to see connectionInvalid
as a server side error - it ought to only be possible on the client side.
from securexpc.
Now that I have access to the source code I tried to replicate this issue, but I'm not sure how to.
I modified RouteHandler.smcStatus(...)
to always throw an error and then called the corresponding route from the client and everything worked as expected. However, that's an error generated by the application code whereas what you show in the screenshot is a framework error which I wouldn't expect to occur (because as previously mentioned connectionInvalid
ought to only be a client side error).
Could you provide me repro steps and/or a branch of your repository that will automatically replicate this issue upon first run?
from securexpc.
Hey!
Check out this branch:
https://github.com/rurza/BatFi/tree/SecureXPC-errorHandler
- Run the app, and install the helper tool. Run commands "turn off charging" and "turn on charging" commands X times. You should get the
SecureXPC.XPCError.insecure
error. Great :) Now you can open the Console.app, start streaming messages. You can filter them bysoftware.micropixels.BatFi.Helper
. Quit the app. - Jackpot, the helper error handler will be called X times
from securexpc.
Related Issues (20)
- Transfer MTLSharedTextureHandle HOT 1
- SMAppService and MachServiceCriteria HOT 12
- `XPCServer` factory functions should always return the same instance
- Add support for handling client errors on reply-less messages HOT 7
- Add async variants of `XPCClient.send/sendMessage(...)` functions HOT 1
- Type errors in routes are conflated with missing routes HOT 2
- Add real XPC integration tests HOT 8
- Sample use case
- Verify that exporting a connection for a Mach service works correctly HOT 2
- Add support for client security requirements in anonymous services
- Throw error when attempting to reconnect to an anonymous service
- Document `startAndBlock()` must be called from main thread
- Verify that `endpoint` works for `XPCServiceServer` HOT 1
- Creating an `XPCAnonymousServer` or `XPCMachServer` and never starting it results in XPC API Misuse
- Client-level error handling HOT 6
- `XPC_ERROR_CONNECTION_INTERRUPTED` doesn't appear to actually behave as documented HOT 4
- [help] How can I use FileHandle as argument of withMessageType HOT 3
- Helper crashing in Catalina & Big Sur. HOT 9
- Using a concurrent DispatchQueue HOT 13
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 securexpc.