mongodb / stitch-ios-sdk

Apache License 2.0
42 stars 25 forks source link

Error encoding json in release mode with standard fastest, smallest optimizations #211

Open EthanSK opened 4 years ago

EthanSK commented 4 years ago

Only when the standard default optimizations for speed and size are on, mongo stitch throws an error with the json encoding. (error code 1). Stitch is horribly ridden with bugs and was one of the worst decisions I ever made to use in my app. But it's too late now. I can't be bothered at this point to provide any more detail so don't ask. This is enough.

Stitch is not a production ready tool. It's an experiment at best.

Error is: could not encode document as extended JSON string

byhkalo commented 4 years ago

The same problem. All our production release stopped 😑.

How to reproduce the bug (our case). Open target section. Choose Release Configuration and run an app.
When calling function insertOne we get next message: error inserting item, internalError(message: "could not encode document as extended JSON string"): encodingError

byhkalo commented 4 years ago

@EthanSK , Could you give advice? Which optimization levels should set to fix it? I tried different, but nothing help. πŸ₯ΊπŸ™

EthanSK commented 4 years ago

This whole project has been deprecated. Someone should sue mongo. My entire app is now worthless, and has to be rewritten from the ground up...

drewdipalma commented 4 years ago

Hi Ethan – While we're not adding new features/addressing all bugs in the Stitch SDKs they will continue to work for the next 12 months. Issues like this (which related to issues with the underlying Swift SDK + newer xCode versions) are now resolved by moving to the Realm SDKs. There are some changes in syntax with the new Realm SDKs, but overall they are relatively minor and syntax for interacting with MongoDB/calling functions remains essentially the same so there shouldn't be a need to re-write your application.