Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'constructor' of null #160

Open
Unisay opened this issue Aug 21, 2018 · 4 comments
Open

TypeError: Cannot read property 'constructor' of null #160

Unisay opened this issue Aug 21, 2018 · 4 comments

Comments

@Unisay
Copy link

Unisay commented Aug 21, 2018

Related to #153

I use parTraverse_ to run test cases in parallel and have the following error (undeterministically, sometimes it doesn't pop-up)

/project/ui-tests/output/Effect.Aff/foreign.js:83
        throw error;
        ^

TypeError: Cannot read property 'constructor' of null
    at Object.isLeft (/project/ui-tests/output/Effect.Aff/index.js:76:112)
    at join (/project/ui-tests/output/Effect.Aff/foreign.js:720:16)
    at /project/ui-tests/output/Effect.Aff/foreign.js:778:19
    at /project/ui-tests/output/Effect.Aff/foreign.js:669:29
    at runEff (/project/ui-tests/output/Effect.Aff/foreign.js:80:7)
    at run (/project/ui-tests/output/Effect.Aff/foreign.js:496:15)
    at /project/ui-tests/output/Effect.Aff/foreign.js:333:19
    at drain (/project/ui-tests/output/Effect.Aff/foreign.js:120:9)
    at Object.enqueue (/project/ui-tests/output/Effect.Aff/foreign.js:141:11)
    at /project/ui-tests/output/Effect.Aff/foreign.js:330:27
@natefaubion
Copy link
Collaborator

Thanks for the bug report! Without any specific information or a reproduction, it's very unlikely it will get addressed directly. If it looks related to an existing closed issue, please make sure you are using the latest release.

@Unisay
Copy link
Author

Unisay commented Aug 21, 2018

I am happy to provide information needed:

  • Aff version 5.0.0
  • Pulp version 12.3.0
  • purs version 0.12.0

Unfortunately I am not allowed to share the code needed to reproduce the problem, but here is an excerpt:

type Sel a = Selenium Unit () a

bootstrapSpec :: Path -> Array Capabilities -> Sel Unit -> Aff Unit
bootstrapSpec path capabilities sel = do
  creds <- BrowserStack.lookupCredentials
  lowerCodensity do
    BrowserStack.proxy creds
    liftCodensity $ parTraverse_ capabilities \caps -> lowerCodensity do
      drv <- driver creds caps
      liftCodensity do
        url <- determineSutUrl path
        Selenium.get drv url
        log "Running test case..."
        runReaderT sel { driver: drv, defaultTimeout: Milliseconds 20000.0 }
        log "Test case completed."

@Unisay
Copy link
Author

Unisay commented Aug 21, 2018

After changing parTraverse_ to forM_ - the error is gone (as well as parallelism)

@natefaubion
Copy link
Collaborator

Have you tried upgrading to 5.0.1, which has the fix for the bug you referenced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants