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

Test failing in current build #5788

Open
1 of 17 tasks
dhowe opened this issue Sep 7, 2022 · 10 comments
Open
1 of 17 tasks

Test failing in current build #5788

dhowe opened this issue Sep 7, 2022 · 10 comments

Comments

@dhowe
Copy link
Contributor

dhowe commented Sep 7, 2022

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.4.2

Web browser and version

NA

Operating System

OS X 11.6.2

Steps to reproduce this

Follow the instructions here: https://p5js.org/contributor-docs/#/?id=development-process and note failing tests in console and browser:

867 passing (60s)
1 failing

  1. src/io/files.js
    loadJSON documentation
    example IDEs #1 works:
    Error: Timeout of 4000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

Warning: [object Object] Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! [email protected] grunt: grunt
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the [email protected] grunt script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

AND (in the browser)

image

@limzykenneth
Copy link
Member

@dhowe Can you share your node.js and npm versions as well? Does it always fail on the same test case?

@dhowe
Copy link
Contributor Author

dhowe commented Sep 8, 2022

Not sure if there was an update, but I no longer see this problem

@limzykenneth
Copy link
Member

Don't think there's an update recently. I'm working on the build and release process at the moment and I'll see how much I can optimize and streamline things. I'll close this for now but if you encounter this problem again and can isolate it, comment here and I'll reopen.

@dhowe dhowe changed the title Test failing in current buijld Test failing in current build Sep 9, 2022
@dhowe
Copy link
Contributor Author

dhowe commented Sep 9, 2022

Ok, so this occurs consistently with node v 16.x at least (though it may be that we want to direct users away from this release):

$ npm -v
8.1.2
$ node -v
v16.13.1

868 passing (56s)
1 failing

  1. src/io/files.js
    loadJSON documentation
    example IDEs #1 works:
    Error: Timeout of 4000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

Warning: [object Object] Use --force to continue.

Aborted due to warnings.

@dhowe dhowe reopened this Sep 9, 2022
@limzykenneth
Copy link
Member

I think I may know what it is but I should have already fixed it...but in any case node 16 causes problems with npm install as well (or rather npm bundle with node 16 causes problems), so it just adds another problem we need to resolve for node 16 😞

@hadenlee
Copy link

hadenlee commented Mar 11, 2023

FWIW, I'm facing the same issue with node 14 (p5.js 1.6.0):

$ npm -v
6.14.10
$ node -v
v14.15.4

results of npm test:

...
      ✅ example #1 works
    p5.MonoSynth documentation
      ✅ example #1 works
    p5.PolySynth documentation
      ✅ example #1 works
  1 failing
  872 passing (34s)
  1) lib/addons/p5.sound.js
       process documentation
         example #1 works:
     Error: Timeout of 4000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

Warning: [object Object] Use --force to continue.

Aborted due to warnings.
npm ERR! Test failed.  See above for more details.

Update: I've tried following combinations of npm/node versions, and the same error occurred in each case.

  • npm 9.6.1 and node 19.7.0 (latest versions as of this comment)
  • npm 9.6.1 and node 16.19.1
  • npm 9.5.0 and node 18.15.0
  • npm 8.19.3 and node 18.15.0
  • npm 8.19.3 and node 18.13.0

@limzykenneth
Copy link
Member

@hadenlee node 14 and node 16 are not supported for building node.js anymore (node 14 EOL is only about a month away and default npm version bundled with many versions of node 16 have a bug that prevents install).

I can't replicate the error you are seeing so if you can provide some more information or do some extra tests (running on a different computer for example) it would help.

@hadenlee
Copy link

@limzykenneth thanks for the comment!
Indeed, it worked on a different machine.

In case others find this helpful:

  • So my earlier comment was on OS X 13.2.1 with M1 chip. For various npm/node versions (excluding node 14/16), npm test still did not work; in particular the latest versions (npm 9.5.0 and node 19.7.0) didn't work.
  • On a different machine (OS X 11.7, Intel) it worked with npm 9.5.0 and node 19.7.0 (latest versions). Did not try other versions.

I wonder if it's due to the chip (Intel vs. Apple M1) for some reason? I found one old issue when searching for M1 or ARM64 but that seems like installation-related, not test-related.

I'm new to node/npm/p5.js, so I don't know how easy/hard a fix will be (given that it's hard to reproduce this), but I would be happy to try any suggestions to make this work on my M1 machine.

@limzykenneth
Copy link
Member

I tried on an M1 machine with macOS 12.5.1 (can't update it to newer versions at the moment) and still cannot replicate, although I doubt the system architecture or OS would be the problem.

What are the installed Chrome and Safari versions on both machines you tested?

@hadenlee
Copy link

For M1 machine

  • Chrome: Version 109.0.5414.119 (Official Build) (arm64)
  • Safari: Version 16.3 (18614.4.6.1.6)

For other machine

  • Chrome: Version 109.0.5414.119 (Official Build) (x86_64)
  • Safari: Version 14.1.2 (16611.3.10.1.15)

On both machines, Chrome is set to be the default browser if that matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Build Process
Development

No branches or pull requests

3 participants