Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.1.X
    • Fix Version/s: 7.1.X
    • Labels:
      None
    • Fix Priority:
      3

      Description

      Occurred on 71 acceptance CI tester:

      [exec] FAIL test/js/hooks/useInterval.es.js
       [exec] ??? Console
       [exec] 
       [exec] console.error ../../../node_modules/jsdom/lib/jsdom/virtual-console.js:29
       [exec] Error: Uncaught [Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
       [exec] 1. You might have mismatching versions of React and the renderer (such as React DOM)
       [exec] 2. You might be breaking the Rules of Hooks
       [exec] 3. You might have more than one copy of React in the same app
       [exec] See 
       https://fb.me/react-invalid-hook-call
       for tips about how to debug and fix this problem.]
       [exec] at reportException (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
       [exec] at invokeEventListeners (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:209:9)
       [exec] at HTMLUnknownElementImpl._dispatch (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:119:9)
       [exec] at HTMLUnknownElementImpl.dispatchEvent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:82:17)
       [exec] at HTMLUnknownElementImpl.dispatchEvent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js:30:27)
       [exec] at HTMLUnknownElement.dispatchEvent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:157:21)
       [exec] at Object.invokeGuardedCallbackDev (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:385:16)
       [exec] at invokeGuardedCallback (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:440:31)
       [exec] at beginWork$$1 (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:25780:7)
       [exec] at performUnitOfWork (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:24698:12)
      { Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: [exec] 1. You might have mismatching versions of React and the renderer (such as React DOM) [exec] 2. You might be breaking the Rules of Hooks [exec] 3. You might have more than one copy of React in the same app [exec] See [https://fb.me/react-invalid-hook-call] for tips about how to debug and fix this problem. [exec] at invariant (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react/cjs/react.development.js:88:15) [exec] at resolveDispatcher (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react/cjs/react.development.js:1436:28) [exec] at useRef (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react/cjs/react.development.js:1471:20) [exec] at useIsMounted (/opt/dev/projects/github/liferay-portal-7.1.x/modules/apps/frontend-js/frontend-js-react-web/src/main/resources/META-INF/resources/js/hooks/useIsMounted.es.js:36:21) [exec] at useInterval (/opt/dev/projects/github/liferay-portal-7.1.x/modules/apps/frontend-js/frontend-js-react-web/src/main/resources/META-INF/resources/js/hooks/useInterval.es.js:24:20) [exec] at Component (/opt/dev/projects/github/liferay-portal-7.1.x/modules/apps/frontend-js/frontend-js-react-web/test/js/hooks/useInterval.es.js:25:19) [exec] at renderWithHooks (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:16260:18) [exec] at mountIndeterminateComponent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:18794:13) [exec] at beginWork$1 (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:20162:16) [exec] at HTMLUnknownElement.callCallback (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:336:14) [exec] at invokeEventListeners (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:193:27) [exec] at HTMLUnknownElementImpl._dispatch (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:119:9) [exec] at HTMLUnknownElementImpl.dispatchEvent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:82:17) [exec] at HTMLUnknownElementImpl.dispatchEvent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js:30:27) [exec] at HTMLUnknownElement.dispatchEvent (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:157:21) [exec] at Object.invokeGuardedCallbackDev (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:385:16) [exec] at invokeGuardedCallback (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:440:31) [exec] at beginWork$$1 (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:25780:7) [exec] at performUnitOfWork (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:24698:12) [exec] at workLoopSync (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:24671:22) [exec] at performSyncWorkOnRoot (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:24270:11) [exec] at scheduleUpdateOnFiber (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:23698:7) [exec] at updateContainer (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:27103:3) [exec] at /opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:27528:7 [exec] at unbatchedUpdates (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:24433:12) [exec] at legacyRenderSubtreeIntoContainer (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:27527:5) [exec] at Object.render (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:27608:10) [exec] at /opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/@testing-library/react/dist/index.js:86:25 [exec] at batchedUpdates$1 (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom.development.js:24386:12) [exec] at act (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/react-dom/cjs/react-dom-test-utils.development.js:1092:14) [exec] at render (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/@testing-library/react/dist/index.js:82:26) [exec] at Object.it (/opt/dev/projects/github/liferay-portal-7.1.x/modules/apps/frontend-js/frontend-js-react-web/test/js/hooks/useInterval.es.js:59:23) [exec] at Object.asyncJestTest (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37) [exec] at resolve (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jest-jasmine2/build/queueRunner.js:43:12) [exec] at new Promise (<anonymous>) [exec] at mapper (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jest-jasmine2/build/queueRunner.js:26:19) [exec] at promise.then (/opt/dev/projects/github/liferay-portal-7.1.x/modules/node_modules/jest-jasmine2/build/queueRunner.js:73:41) [exec] at <anonymous> [exec] at process._tickCallback (internal/process/next_tick.js:188:7) name: 'Invariant Violation', framesToPop: 1 }
      [exec] console.error ../../../node_modules/react-dom/cjs/react-dom.development.js:21843
       [exec] The above error occurred in the <Component> component:
       [exec] in Component

       

      Full console log:

      https://test-1-4.liferay.com/job/test-portal-acceptance-pullrequest-batch(7.1.x)/AXIS_VARIABLE=0,label_exp=!master/17045/consoleFull

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              della.wang Della Wang
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                26 weeks ago

                Packages

                Version Package
                7.1.X