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.

Loading routes do not work in FastBoot

See original GitHub issue

I get the following error in my app:

There was an error running your app in fastboot. More info about the error: 
 Error: a glimmer transaction was begun, but one already exists. You may have a nested transaction
    at debugAssert (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/@glimmer/util.js:62:1)
    at Environment.begin (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/@glimmer/runtime.js:6378:1)
    at Environment.begin (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/ember-glimmer/environment.js:273:1)
    at InertRenderer._renderRoots (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/ember-glimmer/renderer.js:311:1)
    at InertRenderer._renderRootsTransaction (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/ember-glimmer/renderer.js:379:1)
    at InertRenderer._revalidate (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/ember-glimmer/renderer.js:418:1)
    at invokeWithOnError (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/backburner.js:281:1)
    at Queue.flush (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/backburner.js:152:1)
    at DeferredActionQueues.flush (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/backburner.js:343:1)
    at Backburner.end (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/backburner.js:451:1)
    at Timeout.Backburner._boundAutorunEnd [as _onTimeout] (.../tmp/broccoli_merge_trees-output_path-Y53V5i2J.tmp/assets/backburner.js:413:1)
    at ontimeout (timers.js:469:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)

At first I thought liquid-fire (#530) was causing this. But after removing liquid-fire I got the error above.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
topaxicommented, Sep 12, 2017

I could reproduce the error mentioned in the liquid-fire issue #530.

git clone https://github.com/topaxi/fastboot-loading-states
cd fastboot-loading-states
ember s

FastBoot console output upon visit:

There was an error running your app in fastboot. More info about the error: 
 TypeError: Cannot read property 'createComment' of undefined
    at ListBlockOpcode.evaluate (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/@glimmer/runtime.js:6759:1)
    at UpdatingVM.execute (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/@glimmer/runtime.js:6495:1)
    at RenderResult.rerender (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/@glimmer/runtime.js:6853:1)
    at RootState._this.render (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/ember-glimmer/renderer.js:69:1)
    at exports.runInTransaction (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/ember-metal.js:674:1)
    at InertRenderer._renderRoots (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/ember-glimmer/renderer.js:341:1)
    at InertRenderer._renderRootsTransaction (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/ember-glimmer/renderer.js:379:1)
    at InertRenderer._revalidate (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/ember-glimmer/renderer.js:418:1)
    at invokeWithOnError (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/backburner.js:281:1)
    at Queue.flush (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/backburner.js:152:1)
    at DeferredActionQueues.flush (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/backburner.js:343:1)
    at Backburner.end (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/backburner.js:451:1)
    at Timeout.Backburner._boundAutorunEnd [as _onTimeout] (/home/dsenn/gitty/github/fastboot-loading-states/tmp/broccoli_merge_trees-output_path-wTqgLUnw.tmp/assets/backburner.js:413:1)
    at ontimeout (timers.js:469:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)

I’m not sure how closely related this is to my specific case though as I’ve been unable to reproduce the crash I got once I remove liquid-fire from my actual app.

2reactions
CvXcommented, Nov 3, 2017

Here’s a minimal bug repro. Took a couple of days, I’ve been taking away parts of a production app until only this was left:

// routes/application.js
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { next } from '@ember/runloop';
import RSVP from 'rsvp';

export default Route.extend({
  fastboot: service(),

  model() {
    let deferred = RSVP.defer();
    if (this.get('fastboot.isFastBoot')) {
      this.get('fastboot').deferRendering(deferred.promise);
    }

    let controller = this.controllerFor(this.routeName);
    controller.set('data', [1]);

    next(() => {
      controller.set('data', [2]);
      deferred.resolve();
    });
  }
});
// controllers/application.js
import Controller from '@ember/controller';

export default Controller.extend({
});
{{!-- templates/application.js --}}
{{#each data}}
{{/each}}
  • ember-cli-fastboot in devDependencies
Read more comments on GitHub >

github_iconTop Results From Across the Web

Op7pro not responding to fastboot commands | XDA Forums
There are a few things you can try if your OP7 Pro is not responding to fastboot commands: 1. Make sure you have...
Read more >
Shoebox - Ember FastBoot
FastBoot is an addon you can add to existing Ember CLI apps. To FastBoot-enable your application, run: ember install ember-cli-fastboot.
Read more >
Moving Fastboot to Userspace | Android Open Source Project
Android 10 and higher supports resizable partitions by relocating the fastboot implementation from bootloader to userspace.
Read more >
Can I map/redirect routes to ports in the Ember FastBoot App ...
Intended for production, I can not use development-only flags. Example. www.example.com:443 Ember FastBoot App Server ( 4200 ); www.
Read more >
How to Install FASTBOOT and ADB on your MAC - YouTube
In this video, saki will show you how to download and install fastboot and adb on your MAC. We will be using a...
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