question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Freezes in release

See original GitHub issue

Expected Results

It continues to run

Actual Results

Does not reach step2

Steps to Reproduce

There is an error in the release (debug is ok)

Code Sample

class SessionModel {

  static FIELD_ID = '_id'
  static FIELD_TIME = '_time'
  static FIELD_OPERATOR = '_operator'
  static FIELD_OPERATION = '_operation'
  static FIELD_DISABLED = '_disabled'
  static FIELD_EXPORTED = '_exported'

  static FIELD_CODES = '_codes'
}

SessionModel.schema = {
  name: SessionModel.name,
  primaryKey: SessionModel.FIELD_ID,
  properties: {
    [SessionModel.FIELD_ID]: 'int',
    [SessionModel.FIELD_TIME]: 'date',
    [SessionModel.FIELD_OPERATOR]: OperatorModel.name,
    [SessionModel.FIELD_OPERATION]: OperationModel.name,
    [SessionModel.FIELD_DISABLED]: 'bool',
    [SessionModel.FIELD_EXPORTED]: 'bool',
    [SessionModel.FIELD_CODES]: `${CodeModel.name}[]`
  }
}

let realm = await Realm.open({
      schema: [SettingModel, SessionModel, OperatorModel, StoringPlaceModel, OperationModel, CodeModel],
      schemaVersion: 112,
      deleteRealmIfMigrationNeeded: true,
      shouldCompactOnLaunch: (totalBytes, usedBytes) => true
    })

console.log('step1')
let result = realm.objects(SessionModel.name)
console.log('step2')

Output: step1

Version of Realm and Tooling

  • Realm JS SDK Version: 2.0.6
  • Node or React Native: 0.50.3
  • Client OS & Version: Android 4.2.2/8.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sywkacommented, Dec 15, 2017

It was in the use of SessionModel.name. changing this to SessionModel.schema.name fixed it.

0reactions
sywkacommented, Nov 27, 2017

SessionModel.FIELD_ID is link to string _id. I can’t declare it like this SessionModel.FIELD_ID: 'int',. If you mean to replace OperatorModel.name with ${OperatorModel.name} then still can’t sort by _time

Read more comments on GitHub >

github_iconTop Results From Across the Web

Freezing Release - Naruto Fanon Wiki
Freezing Release (凍遁, Tōton, Viz "Freeze Style") is an advance chakra nature stemming from the Ice Release, commonly found in Ice Release users....
Read more >
Flutter app freeze in build release, work properly in debug ...
Any idea why it works in debug and not in release build? I'm iterating an app I'm working on from a while;. I...
Read more >
ReleasePlanning/Freezes - GNOME Wiki!
Release Freezes. The GNOME schedule contains dates for the following freezes. These freezes help GNOME contributors to coordinate their work ...
Read more >
Freeze (software engineering) - Wikipedia
A freeze helps move the project forward towards a release or the end of an iteration by reducing the scale or frequency of...
Read more >
Maui-Blazor Project Template crashes in Release Mode
I'm trying to run the base maui-blazor template in Visual Studio 2022 Preview 3 in release mode. In android devices the application crashes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found