Realm-cocoa: "Bad transaction log" error after deleting entity on Realm Object Server

Created on 29 Sep 2016  路  10Comments  路  Source: realm/realm-cocoa

Every time I delete objects on my Realm Object Server, I can't open the database again. My app crash with this error:

libc++abi.dylib: terminating with uncaught exception of type realm::_impl::TransactLogParser::BadTransactLog: Bad transaction log

If I try to open the database using Realm Browser, the app crash too.

Goals

I want to be able to open a database after removing objects from it

Steps to Reproduce

1- Insert objects into a Realm Object Server
2- Open your DB using Realm Object Server. Your data is there 馃憤
3- Delete your objects using try! realm.write { realm.delete(youModelName) }
4- Try to connect to your Realm Object Server... the app crash with the _bad transaction log_ error. 馃槩

Version of Realm and Tooling

Realm version: 2.0.0

Xcode version: 8.0

iOS/OSX version: 10

Dependency manager + version: CocoaPod 1.1.0.rc.2

Reproduction-Required T-Bug-Crash

Most helpful comment

The same happens for me. I add objects, but once I want to delete them that crashes an open instance of the Realm Browser and subsequently the browser crashes any time I want to re-open my realm. I'll zip the app and send it your way @austinzheng

All 10 comments

Sorry to hear you're having problems. Does this happen no matter what type of model you use? Would you be willing to share your model definition? We will try to reproduce this crash as soon as possible.

The same happens for me. I add objects, but once I want to delete them that crashes an open instance of the Realm Browser and subsequently the browser crashes any time I want to re-open my realm. I'll zip the app and send it your way @austinzheng

I'm having this same issue. How does one access the 2.1.0 beta?

The Realm Mobile Platform Getting Started Guide always has an up-to-date download link for the latest RMP release. Here's the direct download link as of October 11th: https://static.realm.io/downloads/mobile-platform/1.0.0-BETA-2.1/realm-mobile-platform.zip

My server is now running 2.1.0. But I still get the crash on my iOS device:

libc++abi.dylib: terminating with uncaught exception of type realm::_impl::TransactLogParser::BadTransactLog: Bad transaction log

What version of the Objective-C/Swift framework are you using? Version 2.1.0 of the server is only compatible with Realm Objective-C/Swift 2.0.2.

I'm on Swift 2.0.2

Please file a new issue ideally with all the steps you took and a sample Xcode project that can trigger the problem. If that's not possible, then a full stack trace may be useful. Also, knowing if this also occurs on a fresh install of your app and with no pre-existing Realm files on the server (or your app) would be useful.

This may be related to realm/realm-sync#896

I got it to work by deleting the previous user on the server and reinstalling the app fresh on all my devices. Thank you!

Was this page helpful?
0 / 5 - 0 ratings