Appchance / ember-cached-shoe

Fastboot rehydration without redundant ajax
MIT License
29 stars 6 forks source link

Broken in ember-cli 3.5+ #5

Closed nickschot closed 5 years ago

nickschot commented 6 years ago

Probably due to breaking changes in broccoli 2.

See: https://github.com/ember-cli/ember-cli/issues/8140

The-Don-Himself commented 6 years ago

Yep, also running into this

        at WebpackWriter
-~- created here: -~-
    at WebpackWriter.Plugin (/builds/campus-discounts/ember.js/node_modules/broccoli-webpack/node_modules/broccoli-plugin/index.js:10:31)
    at WebpackWriter.CachingWriter [as constructor] (/builds/campus-discounts/ember.js/node_modules/broccoli-webpack/node_modules/broccoli-caching-writer/index.js:18:10)
    at new WebpackWriter (/builds/campus-discounts/ember.js/node_modules/broccoli-webpack/index.js:13:16)
    at Class.processTree (/builds/campus-discounts/ember.js/node_modules/ember-cached-shoe/index.js:26:21)
    at processedTree (/builds/campus-discounts/ember.js/node_modules/ember-cli-node-assets/lib/tree-for.js:40:43)
Uysim commented 5 years ago

+1

williamweckl commented 5 years ago

Any updates on this?

HarenBroog commented 5 years ago

I will look at this problem this week guys. It seems like easy to fix ;)

catz commented 5 years ago

Have a look at my proposal https://github.com/catz/ember-cached-shoe/commit/dec55e8a6c167e2d0a37751b34765d33a5d52e5d

HarenBroog commented 5 years ago

@marucjmar any progress with this?

marucjmar commented 5 years ago

@HarenBroog I'm testing a new solution on the branch feature/ember-cli-3.5-support

williamweckl commented 5 years ago

@marucjmar Thanks for the amazing work! Is the branch feature/ember-cli-3.5-support safe to use in production? I want to update my ember.js but this library is the only one thats stoping me to do that.

fiddler commented 5 years ago

I've tried the branch and it seems to crash when your fields contain emojis for example with the following error:

VM155 vendor-21373b1980f05b0d9b9a23fc78de534e.js:1781 Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

On a quick peek it looks like the earlier version was using https://github.com/kaelzhang/b2a to get around these issues. @marucjmar might consider using that in the branch too? :)

I managed to make it work by monkey patching in a replacement function for btoa, which does not die with unicode characters.

adambedford commented 5 years ago

Any progress on this?

danwenzel commented 5 years ago

This is blocking us as well. @HarenBroog @marucjmar - Any updates?

marucjmar commented 5 years ago

Close with PR #7
should be used 0.2.0 version

danwenzel commented 5 years ago

0.2.0 solved the issue for us. Thank you!