Skip to content

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

Open

Description

@Unisay

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

Activity

  1. natefaubion commented on Aug 21, 2018

    @natefaubion
    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.

  2. Unisay commented on Aug 21, 2018

    @Unisay
    Author

    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."
  3. Unisay commented on Aug 21, 2018

    @Unisay
    Author

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

  4. natefaubion commented on Aug 21, 2018

    @natefaubion
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions