ember-fastboot / ember-fastboot/ember-cli-fastboot

Duplicate first app load

Open
#607 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
850
Forks
161
Avg merge
17h 45m
Merged PRs (30d)
19

Description

I'm experiencing a strange behavior and I'm not sure if it's a bug.
When I start my app it always fires two api requests. It looks like the app loads and then it reloads the second time.

I've created a new ember project and the same happens.
Just a route call:
``` javascript
export default Route.extend({
model() {
return fetch('http://localhost:3333/me')
}
});
```

inspector:
![image](https://user-images.githubusercontent.com/886192/44237064-6de6ef80-a1af-11e8-8170-8a982b971f90.png)

and the server:
![image](https://user-images.githubusercontent.com/886192/44237077-7a6b4800-a1af-11e8-9ac3-1d9a9d3bf9e7.png)

When it loads, all other api calls are fired only once and it only happens when fastboot is enabled.

My packages:
```
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.1.0",
"ember-cli": "^3.3.0",
"ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^6.6.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.0.0",
"ember-cli-fastboot": "^1.1.4-beta.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"ember-data": "^2.16.4",
"ember-export-application-global": "^2.0.0",
"ember-fetch": "^5.1.1",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.16.0",
"ember-welcome-page": "^3.0.0",
"loader.js": "^4.2.3"
```

How can I prevent this? I'm making some token invalidation and it is screwing things up.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.