Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Tests fail in gumgumAdapter

Open michael-stevens opened this issue 4 years ago • 8 comments

Type of issue

This is a bug.

Description

Tests fail when running gulp serve.

Steps to reproduce

Check out project.

Run the following commands:

  1. npm ci
  2. gulp serve

Expected results

Tests pass.

Actual results

Tests fail:

07 12 2021 16:41:02.725:INFO [Chrome Headless 96.0.4664.93 (Linux x86_64)]: Connected on socket l3pfhFDoPMzgyYhSAAAB with id 4152976
Chrome Headless 96.0.4664.93 (Linux x86_64) LOG: undefined
INFO: '%cPrebid', 'display: inline-block; color: #fff; background: #3b88c3; padding: 1px 4px; border-radius: 3px;', 'INFO:', 'BidRequest: {"id":"173afb6d132ba3","source":{"tid":"437fbbf5-33f5-487a-8e16-a7112903cfe5"},"tmax":1000,"imp":[{"id":"div-gpt-ad-1460505748561-0","ext":{"appnexus":{"member":"123","use_pmt_rule":false,"placement_id":10433394},"prebid":{"storedauctionresponse":{"id":"11111"}}},"banner":{"format":[{"w":300,"h":250},{"w":300,"h":300}]},"native":{"request":"{\"context\":1,\"plcmttype\":1,\"eventtrackers\":[{\"event\":1,\"methods\":[1]}],\"assets\":[{\"required\":1,\"title\":{\"len\":800}},{\"required\":1,\"img\":{\"type\":3,\"w\":989,\"h\":742}},{\"required\":1,\"img\":{\"type\":1,\"wmin\":10,\"hmin\":10,\"ext\":{\"aspectratios\":[\"1:1\"]}}},{\"required\":1,\"data\":{\"type\":1}}]}","ver":"1.2"}}],"test":0,"ext":{"prebid":{"auctiontimestamp":1510852447530,"targeting":{"includewinners":true,"includebidderkeys":false},"channel":{"name":"pbjs","version":"v6.4.0-pre"},"debug":true}},"site":{"publisher":{"id":"1"},"page":"http://mytestpage.com"},"device":{"w":100,"h":100}}'
LOG: undefined
LOG: undefined
LOG: undefined
LOG: 1
LOG: Object{id: 464646969, sizes: [Object{width: ..., height: ...}], floor: 1, segments: Object{segments: [], contextual_categories: Object{}}}
LOG: '[{"requestId":"2ed93003f7bb99","width":640,"height":360,"cpm":500,"currency":"JPY","creativeId":1000,"dealId":"","ttl":300,"netRevenue":true,"mediaType":"video","meta":{"advertiserDomains":["relaido.co.jp","www.cmertv.co.jp"],"mediaType":"video"},"vastXml":"<VAST version=\"3.0\"><Ad><InLine></InLine></Ad></VAST>","renderer":{"url":"https://relaido/player.js","handlers":{},"id":"2ed93003f7bb99","loaded":false,"cmd":[]}}]'
LOG: '[{"requestId":"2ed93003f7bb99","width":640,"height":360,"cpm":500,"currency":"JPY","creativeId":1000,"dealId":"","ttl":300,"netRevenue":true,"mediaType":"banner","meta":{"advertiserDomains":["relaido.co.jp","www.cmertv.co.jp"],"mediaType":"video"},"ad":"<div id=\"rop-prebid\"><script src=\"https://relaido/player.js\"></script><script>(function(){window.RelaidoPlayer.renderAd({width: 640,height: 360,vastXml: '<VAST version=\"3.0\"><Ad><InLine></InLine></Ad></VAST>',mediaType: 'banner'});})();</script></div>"}]'

Finished in 25.258 secs / 14.234 secs @ 16:41:38 GMT+0000 (Greenwich Mean Time)

SUMMARY:
✔ 8902 tests completed
ℹ 11 tests skipped
✖ 1 test failed

FAILED TESTS:
  gumgumAdapter
    buildRequests
      ✖ should include the local time and timezone offset
        Chrome Headless 96.0.4664.93 (Linux x86_64)
      AssertionError: expected false to be true

      + expected - actual

      -false
      +true

    at Context.<anonymous> (webpack:///test/spec/modules/gumgumBidAdapter_spec.js:545:7 <- test/test_index.js:338065:87)


07 12 2021 16:41:45.303:WARN [launcher]: ChromeHeadless was not killed in 2000 ms, sending SIGKILL.
[16:41:45] 'test' errored after 2.52 min
[16:41:45] Error: Karma tests failed with exit code 1
    at /home/mstevens/main/Prebid.js/gulpfile.js:289:12
    at removeAllListeners (/home/mstevens/main/Prebid.js/node_modules/karma/lib/server.js:462:9)
    at /home/mstevens/main/Prebid.js/node_modules/karma/lib/server.js:469:9
    at Server.close (node:net:1628:9)
    at Object.onceWrapper (node:events:509:28)
    at Server.emit (node:events:402:35)
    at Server.emit (node:domain:537:15)
    at emitCloseNT (node:net:1681:8)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[16:41:45] 'serve' errored after 3.1 min

Platform details

prebid.js is github head commit 243af6c278c57cb7f3b81ddea0781d9a313da042.

npm version:

mstevens@DESKTOP-GT2RF3E:~/main/Prebid.js$ npm version
{
  'prebid.js': '6.4.0-pre',
  npm: '8.1.2',
  node: '16.13.1',
  v8: '9.4.146.24-node.14',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '93',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '1.1.1l+quic',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

Linux is WSL:

mstevens@DESKTOP-GT2RF3E:~/main/Prebid.js$ uname -a
Linux DESKTOP-GT2RF3E 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

michael-stevens avatar Dec 07 '21 16:12 michael-stevens

@michael-stevens curious if you are still experiencing this issue or found a fix because haven't been able to duplicate this myself.

ChrisHuie avatar Dec 20 '21 14:12 ChrisHuie

Hi,

I'm still seeing the same issue with a fresh checkout of HEAD, I've attached the full output running "gulp serve". typescript.txt

michael-stevens avatar Dec 20 '21 15:12 michael-stevens

To further test I did a clean checkout on a different OS (switched from windows and WSL to a chromebook with a linux container) and I see the same error:

SUMMARY:
✔ 8969 tests completed
ℹ 11 tests skipped
✖ 1 test failed

FAILED TESTS:
  gumgumAdapter
    buildRequests
      ✖ should include the local time and timezone offset
        Chrome Headless 96.0.4664.110 (Linux x86_64)
      AssertionError: expected false to be true

      + expected - actual

      -false
      +true
      
    at Context.<anonymous> (webpack:///test/spec/modules/gumgumBidAdapter_spec.js:545:7 <- test/test_index.js:340283:87)


20 12 2021 15:35:09.527:WARN [launcher]: ChromeHeadless was not killed in 2000 ms, sending SIGKILL.
[15:35:09] 'test' errored after 2.17 min
[15:35:09] Error: Karma tests failed with exit code 1
    at /home/mstevens/Prebid.js/gulpfile.js:289:12
    at removeAllListeners (/home/mstevens/Prebid.js/node_modules/karma/lib/server.js:462:9)
    at /home/mstevens/Prebid.js/node_modules/karma/lib/server.js:469:9
    at Server.close (node:net:1628:9)
    at Object.onceWrapper (node:events:509:28)
    at Server.emit (node:events:402:35)
    at Server.emit (node:domain:537:15)
    at emitCloseNT (node:net:1681:8)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[15:35:09] 'serve' errored after 2.78 min

michael-stevens avatar Dec 20 '21 15:12 michael-stevens

I repeated the steps on a Ubuntu 20.04 on WSL2 with Windows 10 and a Chromebook running Debian 10 in a Linux container and have not been able to replicate this error. This is pretty strange to see this test of all the others across the repo fail, and I'm not sure how a different environment would change this as Date is an old and widely accepted Browser API.

Out of curiosity have you tried pulling down the repo in another location and attempting again?

ncolletti avatar Dec 21 '21 00:12 ncolletti

I see the same error.

I am running:

  • MacOS Monterey v12.0.1
  • Node.js v14.15.3
  • Gulp (CLI v2.3.0 / Local v4.0.2)

I did a fresh pull down of Prebid.js and then ran the following:

  • $ git clone https://github.com/prebid/Prebid.js.git
  • $ cd Prebid.js
  • $ npm ci
  • $ gulp serve

Eventually I see the following error:

image

{
  'prebid.js': '6.6.0-pre',
  npm: '6.14.9',
  ares: '1.16.1',
  brotli: '1.0.9',
  cldr: '37.0',
  icu: '67.1',
  llhttp: '2.1.3',
  modules: '83',
  napi: '7',
  nghttp2: '1.41.0',
  node: '14.15.3',
  openssl: '1.1.1g',
  tz: '2020a',
  unicode: '13.0',
  uv: '1.40.0',
  v8: '8.4.371.19-node.17',
  zlib: '1.2.11'
}

mhc-gh avatar Dec 22 '21 15:12 mhc-gh

Thanks @mhc-gh .. Adding a few folks from recent PRs with GumGum for visibility on this issue. @lbenmore @estavillo

ncolletti avatar Dec 22 '21 16:12 ncolletti

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 08 '22 23:01 stale[bot]

I've retested and believe this is fixed by the commits above.

michael-stevens avatar Jan 10 '22 09:01 michael-stevens