Skip to content
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

Random failures: NSInternalInconsistencyException: 'Invalid parameter not satisfying: url' #17

Open
gregschwartz opened this issue Jul 1, 2021 · 3 comments

Comments

@gregschwartz
Copy link

Using the iOS SDK. When the app first launches, I set up the Logger like so:

ISHLogDNAService.setup(
  withIngestionKey: self.ISHLogDNAServiceIngestionKey,
  hostName: hostName,
  appName: self.ISHLogDNAServiceAppName
)

Then in my Introduction screen, I call an .info level log to say that the app has started. Regardless of content, on certain devices it works, and others it always fails with this response:

*** Assertion failure in -[ISHLogDNAService logMessages:], ISHLogDNAService.m:232
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: url'
*** First throw call stack:
(0x193746754 0x1a820d7a8 0x1936483f8 0x194a1c714 0x103f8ec18 0x103f8e748 0x103049310 0x10304968c 0x102ffa864 0x102fc9e6c 0x108bfdde0 0x108c00ed0 0x108c16ca0 0x108c0def0 0x1936c0398 0x1936ba270 0x1936b9360 0x1aacf7734 0x196134584 0x196139df4 0x1a747d24c 0x10303a000 0x103039f78 0x10303a0f4 0x193375cf8)
libc++abi: terminating with uncaught exception of type NSException

Yesterday that bug started happening on a device that previously worked... and today it's back to normal. Any idea what would be causing this, and why it would be intermittent?

@gregschwartz gregschwartz changed the title Random failures: NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: url' Random failures: NSInternalInconsistencyException: 'Invalid parameter not satisfying: url' Jul 1, 2021
@gregschwartz
Copy link
Author

@schneider-iosphere @felixLam any idea why this is happening? Just started happening on another device that was previously fine, for no apparent reason...

@gregschwartz
Copy link
Author

Ah, I finally figured it out. It's because hostname isn't being escaped when generating the URL. So if it contains a space or other non-url allowed character... 💥

And because the URL missing causes the application to crash instead of just a notable little error. Why!?!!

Working on a pull request to fix both.

@gregschwartz
Copy link
Author

Here's the pull request: #18
@felixLam @shagedorn

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant