Closed RobbieTheWagner closed 6 years ago
Can you tell me your app Ember version?
I added an injection test, and really can't see the problem...
I also just found your app source, I will try it later today to see what is happening.
The branch I tried it on is https://github.com/shipshapecode/shipshape.io/tree/bssj
The error you are experiencing is in fastboot, right?
@tchak yes. You can pull down that branch and run it and see the error by navigating to the blog, and doing a hard refresh, I believe.
@rwwagner90 I am not sure what was the case, but I just tried your branch and it worked with the last version of ember-fetch-adapter
. I needed to add hostWhitelist: [/^localhost:\d+$/]
though.
@tchak I will try the latest, but it doesn't look like anything changed really. I expect the issue to be reproducible. Was there an error without hostWhitelist
?
@tchak it seems that installing ember-fetch
alongside ember-fetch-adapter
makes things work again. I supposed having it in dependencies
here isn't enough for some reason?
Guessing this is tied to https://github.com/ember-cli/ember-fetch/issues/98?
I'm now hitting another issue, trying to use this with prember.
7:27:23 AM: Error while processing route: blog.index Only HTTP(S) protocols are supported TypeError: Only HTTP(S) protocols are supported
7:27:23 AM: at getNodeRequestOptions (/opt/build/repo/node_modules/node-fetch/lib/index.js:1288:9)
7:27:23 AM: at /opt/build/repo/node_modules/node-fetch/lib/index.js:1370:19
7:27:23 AM: at new Promise (<anonymous>)
7:27:23 AM: at fetch (/opt/build/repo/node_modules/node-fetch/lib/index.js:1367:9)
7:27:23 AM: at abortableFetch (/opt/build/repo/node_modules/abortcontroller-polyfill/dist/cjs-ponyfill.js:290:12)
7:27:23 AM: at n.value [as makeRequest] (/opt/build/repo/tmp/prember-input_base_path-NFp5JPSm.tmp/assets/vendor.js:4358:90)
7:27:23 AM: at /opt/build/repo/tmp/prember-input_base_path-NFp5JPSm.tmp/assets/vendor.js:4346:170
7:27:23 AM: at <anonymous>
Any ideas?
@rwwagner90 Yeah, I've seen some weird behavior in Prember where you wind up with the fastboot service reporting a protocol of "undefined:"
https://github.com/ember-learn/ember-cli-addon-docs/pull/179/files#diff-4a0c31f2b4c62182ee0685e126f0147fR18
There may be something that needs to be fixed upstream, but in the interim ember-fetch-adapter
might want to add an explicit check for that.
I released a new version. Can you try and close this if the problem is solved.
Thanks @rwwagner90 and @dfreeman for working this out!
With the protocol fix and the addition of the blueprint, this issue should be resolved.
I seem to be getting an error trying to inject the service.