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

Fix SignalR TS client build on macOS #9230

Merged
merged 10 commits into from
Apr 13, 2019
Merged

Conversation

halter73
Copy link
Member

Example output from a clean master repo before this change on my mac:

shalter@halter73-mbp ts (master$% u=)$ dotnet build client-ts.npmproj /t:Test
Microsoft (R) Build Engine version 16.1.4-preview+ga972ec96c3 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Running yarn install on /Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/client-ts.npmproj
  yarn run v1.13.0
  $ npm run clean && npm run build:lint && npm run build:esm && npm run build:cjs && npm run build:browser && npm run build:webworker && npm run build:uglify
  
  > @aspnet/signalr@3.0.0-preview4-t000 clean /Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/signalr
  > node ../common/node_modules/rimraf/bin.js ./dist
  
  
  > @aspnet/signalr@3.0.0-preview4-t000 build:lint /Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/signalr
  > node ../common/node_modules/tslint/bin/tslint -c ../tslint.json -p ./tsconfig.json
  
  
YARN : error : /Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/signalr/src/Polyfills.ts:7:5 - Interface has only a call signature — use `type EventSourceConstructor = new(url: string, eventSourceInitDict?: EventSourceInit) => EventSource;` instead. [/Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/signalr/signalr.npmproj]
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 2
  npm ERR! @aspnet/signalr@3.0.0-preview4-t000 build:lint: `node ../common/node_modules/tslint/bin/tslint -c ../tslint.json -p ./tsconfig.json`
  npm ERR! Exit status 2
  npm ERR! 
  npm ERR! Failed at the @aspnet/signalr@3.0.0-preview4-t000 build:lint script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/shalter/.npm/_logs/2019-04-10T00_48_34_598Z-debug.log
  error Command failed with exit code 2.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Build FAILED.

YARN : error : /Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/signalr/src/Polyfills.ts:7:5 - Interface has only a call signature — use `type EventSourceConstructor = new(url: string, eventSourceInitDict?: EventSourceInit) => EventSource;` instead. [/Users/shalter/source/aspnet/AspNetCore/src/SignalR/clients/ts/signalr/signalr.npmproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:07.99

@halter73
Copy link
Member Author

@aspnet/build I'm not sure I trust the @aspnet-hello bot to triage this because the main build output is nondescript:

  Running tests for SignalR.Npm.FunctionalTests
YARN : error : Timeout - Async callback was not invoked within 10000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) [F:\workspace\_work\1\s\src\SignalR\clients\ts\FunctionalTests\SignalR.Npm.FunctionalTests.npmproj]

But node.functionaltests.log reveals what appears to be an issue with the Windows test agent:

FAIL ts/WebWorkerTests.ts
  ● Test suite failed to run

    jest: failed to cache transform results in: C:/Users/vsagent/AppData/Local/Temp/jest/jest-transform-cache-6694f046e2767546919022acb05992f2-00ff109b410d1e04a0401cceb4950102/11/TextMessageFormat_118aa94b7bb0747451fe5760bd8d2e9e.map
    Failure message: EBADF: bad file descriptor, close

      at Object.closeSync (../common/node_modules/graceful-fs/graceful-fs.js:52:27)
      at Function.writeFileSync [as sync] (../common/node_modules/write-file-atomic/index.js:228:16)

FAIL ts/ConnectionTests.ts
  ● Test suite failed to run

    jest: failed to cache transform results in: C:/Users/vsagent/AppData/Local/Temp/jest/jest-transform-cache-6694f046e2767546919022acb05992f2-00ff109b410d1e04a0401cceb4950102/52/Subject_521717926c28a14c476d5a5ad6069c13.map
    Failure message: EBADF: bad file descriptor, close

      at Object.closeSync (../common/node_modules/graceful-fs/graceful-fs.js:52:27)
      at Function.writeFileSync [as sync] (../common/node_modules/write-file-atomic/index.js:228:16)

FAIL ts/HubConnectionTests.ts
  ● Test suite failed to run

    jest: failed to cache transform results in: C:/Users/vsagent/AppData/Local/Temp/jest/jest-transform-cache-6694f046e2767546919022acb05992f2-00ff109b410d1e04a0401cceb4950102/31/index_31a87def66c4bc2124441a16c2169678
    Failure message: EBADF: bad file descriptor, close

      at Object.closeSync (../common/node_modules/graceful-fs/graceful-fs.js:52:27)
      at Function.writeFileSync [as sync] (../common/node_modules/write-file-atomic/index.js:228:16)

PASS ts/WebSocketTests.ts
  ● Console

    console.log ts/Common.ts:52
      Using SignalR HTTP Server: 'http://127.0.0.1:63426'
    console.log ts/Common.ts:53
      Using SignalR HTTPS Server: 'https://127.0.0.1:63425'
    console.log ts/Common.ts:54
      Jasmine DEFAULT_TIMEOUT_INTERVAL: 20000
    console.log ts/LogBannerReporter.ts:5
      *** JASMINE SUITE STARTED ***
    console.log ts/LogBannerReporter.ts:15
      *** SPEC STARTED: WebSockets can be used to connect to SignalR [2019-04-10T06:47:13.385Z] ***
    console.log ts/LogBannerReporter.ts:22
      *** SPEC DONE: WebSockets can be used to connect to SignalR [2019-04-10T06:47:14.338Z; Duration: 953ms] ***
    console.log ts/LogBannerReporter.ts:9
      *** JASMINE SUITE FINISHED ***


Test Suites: 3 failed, 1 passed, 4 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        9.829s
Ran all test suites.

@halter73
Copy link
Member Author

Looks like the Windows 10 EBADF errors can be fixed by upgrading Jest: jestjs/jest#7709

I'll just fix it in this PR: d712b64

@Eilon Eilon added the area-signalr Includes: SignalR clients and servers label Apr 11, 2019
@halter73 halter73 force-pushed the halter73/signalr-ts-mac-build branch from e2da3a6 to d71d8a1 Compare April 11, 2019 20:04
@halter73 halter73 force-pushed the halter73/signalr-ts-mac-build branch from dbda9c2 to ca45382 Compare April 12, 2019 20:06
@BrennanConroy
Copy link
Member

@aspnet-hello
Copy link

This comment was made automatically. If there is a problem contact ryanbrandenburg.

I've triaged the above build. I've created/commented on the following issue(s)
https://github.com/aspnet/AspNetCore-Internal/issues/1791

@halter73 halter73 merged commit 28970a3 into master Apr 13, 2019
@halter73 halter73 deleted the halter73/signalr-ts-mac-build branch April 13, 2019 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants