GithubHelp home page GithubHelp logo

Comments (25)

ryanto avatar ryanto commented on June 21, 2024 2

Oh wow, in 0.0.11 I wanted to add compatibility with FastBoot 2.0, not force an upgrade. Yikes!

Let me make a new release that sets the FastBoot version back to ^1.2.1

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024 1

Woooohoooooo!!!!!

I'll cut a release once CI passes

from ember-cli-fastboot-testing.

CvX avatar CvX commented on June 21, 2024

0.0.11 updated fastboot dependency to 2.x. There's currently an incompatibility issue with fastboot 2.x and ember-fetch. See: ember-cli/ember-fetch#184 and ember-fastboot/ember-cli-fastboot#686

A best workaround for now is to lock fastboot to 1.x, by adding this to your package.json:

  "resolutions": {
    "fastboot": "^1.2.1"
  }

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

Actually, I tried upgrading first 0.0.11 and then 0.0.13, it was jumping from 0.0.13 to 0.0.14 where it blew up.

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Ok, so just to confirm 0.0.11 and 0.0.13 work in your app? It's 0.0.14 that errors?

from ember-cli-fastboot-testing.

CvX avatar CvX commented on June 21, 2024

fwiw in my app it was the 0.0.11 and the update to fastboot 2.x. That resulted in "abortcontroller-polyfill/dist/cjs-ponyfill" error on build time.

@0xadada case might be different, since it seems that's a runtime error (with a failed assertion and an infinite rendering)

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Thanks @CvX - You used yarn resolutions to fix it?

from ember-cli-fastboot-testing.

CvX avatar CvX commented on June 21, 2024

You used yarn resolutions to fix it?

That's right. I'm currently using ember-cli-fastboot-testing 0.0.14 and fastboot locked via resolutions to "^1.2.1".

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

Ok, so just to confirm 0.0.11 and 0.0.13 work in your app? It's 0.0.14 that errors? @ryanto

Yup, going from 0.0.13 to 0.0.14 is where i'm seeing the failures. I was able to get 0.0.13 working after doing a completely new yarn install. I'll edit the OP to clarify.

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

@ryanto @CvX the package versions output by yarn for this repo:

$ grep '"version"' -B 1 node_modules/*fastboot*/package.json
node_modules/ember-cli-fastboot-testing/package.json-  "name": "ember-cli-fastboot-testing",
node_modules/ember-cli-fastboot-testing/package.json:  "version": "0.0.13",
--
node_modules/ember-cli-fastboot/package.json-  "name": "ember-cli-fastboot",
node_modules/ember-cli-fastboot/package.json:  "version": "2.0.4",
--
node_modules/fastboot-express-middleware/package.json-  "name": "fastboot-express-middleware",
node_modules/fastboot-express-middleware/package.json:  "version": "1.2.0",
--
node_modules/fastboot-transform/package.json-  "name": "fastboot-transform",
node_modules/fastboot-transform/package.json:  "version": "0.1.3",
--
node_modules/fastboot/package.json-  "name": "fastboot",
node_modules/fastboot/package.json:  "version": "1.2.1",

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Ok great. Thanks for the detailed info!

I added some new features related to network requests in 0.0.14 that probably need some better tests.

I'll get that fixed, but for now use 0.0.13 since that appears to be working

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

@ryanto if you point me in the right direction, i could potentially add some tests later this week.

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

@ryanto oh whoa, i found something even more interesting: If i run ember test it passes, but If i enable code coverage, it fails with a different error related to networking.

version 0.0.13

$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # PASSes test

version 0.0.14

$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # FAIL test

the error is as follows:

not ok 202 Chrome 74.0 - [undefined ms] - Global error: Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'json'). at http://localhost:7357/228108987734153/tests/index.html?hidepassed, line 96
 After execution of test: ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly
    ---
        Log: |
            { type: 'error',
              testContext:
               { id: 201,
                 name:
                  'ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly',
                 items: [],
                 state: 'complete' },
              text:
               'Uncaught InvalidStateError: Failed to read the \'responseText\' property from \'XMLHttpRequest\': The value is only accessible if the object\'s \'responseType\' is \'\' or \'text\' (was \'json\'). at http://localhost:7357/228108987734153/tests/index.html?hidepassed, line 96\n' }
    ...

I have a strong feeling that when ember-cli-code-coverage sends the coverage report back, it uses an AJAX request that has been modified to interact with fastboot.

To work, this addon has to post coverage results back to a middleware at /write-coverage.
https://github.com/kategengler/ember-cli-code-coverage/#create-a-passthrough-when-intercepting-all-ajax-requests-in-tests

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Thanks @0xadada !

Edit: Removed my question because I saw you already answered it!

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

@ryanto yup, heres the breakdown

version 0.0.13

$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # PASSes test

version 0.0.14

$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # FAIL test

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Thanks! I just noticed you already answered that question above!!!

I think I might have figured it out, can you do me a favor and try out this branch? #46

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

@ryanto yup, that worked 👌 🎉

from ember-cli-fastboot-testing.

0xadada avatar 0xadada commented on June 21, 2024

@ryanto out of curiosity, how do you start the app and step your debugger through this? some magickal incantation of node --inspect-brk ./node_modules/.bin/ember serve or some such, and then attach chrome inspector?

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

@0xadada Yup, I made a video about this exact sort of thing! https://embermap.com/video/faster-node-debugging

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Alright this is fixed and released in 0.0.15

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Btw, thanks for doing all the debugging on this one @0xadada

from ember-cli-fastboot-testing.

runspired avatar runspired commented on June 21, 2024

I'm hitting this with the following:

ember-cli-fastboot 3.3.2
├── fastboot 3.3.2
└─┬ fastboot-express-middleware 3.3.2
  └── fastboot 3.3.2
ember-cli-fastboot-testing 0.6.0
└── fastboot 3.3.2

from ember-cli-fastboot-testing.

runspired avatar runspired commented on June 21, 2024

I believe the issue here is an undeclared dependency on abortcontroller-polyfill

from ember-cli-fastboot-testing.

ryanto avatar ryanto commented on June 21, 2024

Thanks runspired. What's the fix? Should we have abortcontroller-polyfill as a dep of this library?

from ember-cli-fastboot-testing.

runspired avatar runspired commented on June 21, 2024

@ryanto I think it needs be a dep but I forget if this library for ember-fetch was the culprit, I ended up ripping out ember-fetch and we're still testing with this library in ember-data so I'm guessing it was ember-fetch.

from ember-cli-fastboot-testing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.