Skip to content

Assert in addIndirectUser in FAR in microsoft/playwright #50867

Closed

Description

@amcasey

microsoft/playwright the file being passed to addIndirectUser is here. The assert is that isAvailableThroughGlobal is false, which it's not because debug is exported globally here.

Originally posted by Andrew Casey (@amcasey) in #50835 (comment)

Activity

  1. amcasey commented on Sep 20, 2022

    @amcasey
    MemberAuthor

    microsoft/playwright

    ⚠️ Note that typescript-4.8.3 also had errors ⚠️
    Req #6501 - references
        at addIndirectUser (/typescript-4.8.3/lib/tsserver.js:138032:26)
        at handleDirectImports (/typescript-4.8.3/lib/tsserver.js:137990:37)
        at getImportersForExport (/typescript-4.8.3/lib/tsserver.js:137912:13)
        at State.importTracker (/typescript-4.8.3/lib/tsserver.js:137888:26)
        at State.getImportSearches (/typescript-4.8.3/lib/tsserver.js:139444:33)
        at searchForImportsOfExport (/typescript-4.8.3/lib/tsserver.js:139493:32)
        at getImportOrExportReferences (/typescript-4.8.3/lib/tsserver.js:139986:21)
        at getReferencesAtLocation (/typescript-4.8.3/lib/tsserver.js:139906:17)
        at getReferencesInContainer (/typescript-4.8.3/lib/tsserver.js:139840:21)
        at getReferencesInContainerOrFiles (/typescript-4.8.3/lib/tsserver.js:139339:21)
        at getReferencedSymbolsForSymbol (/typescript-4.8.3/lib/tsserver.js:139330:21)
        at getReferencedSymbolsForModuleIfDeclaredBySourceFile (/typescript-4.8.3/lib/tsserver.js:139147:67)
        at Object.getReferencedSymbolsForNode (/typescript-4.8.3/lib/tsserver.js:139073:40)
        at Object.findReferencedSymbols (/typescript-4.8.3/lib/tsserver.js:138661:42)
        at Object.findReferences (/typescript-4.8.3/lib/tsserver.js:167440:41)
        at /typescript-4.8.3/lib/tsserver.js:177595:53
        at searchPosition (/typescript-4.8.3/lib/tsserver.js:177792:38)
        at getPerProjectReferences (/typescript-4.8.3/lib/tsserver.js:177760:42)
        at getReferencesWorker (/typescript-4.8.3/lib/tsserver.js:177592:37)
        at IOSession.Session.getReferences (/typescript-4.8.3/lib/tsserver.js:179195:34)
        at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/typescript-4.8.3/lib/tsserver.js:178032:61)
        at /typescript-4.8.3/lib/tsserver.js:180166:96
        at IOSession.Session.executeWithRequestId (/typescript-4.8.3/lib/tsserver.js:180157:28)
        at IOSession.Session.executeCommand (/typescript-4.8.3/lib/tsserver.js:180166:41)
        at IOSession.Session.onMessage (/typescript-4.8.3/lib/tsserver.js:180194:35)
        at Interface.<anonymous> (/typescript-4.8.3/lib/tsserver.js:184330:31)
    
    Req #6501 - references
        at addIndirectUser (/typescript-4.9.0-dev.20220918/lib/tsserver.js:139048:26)
        at handleDirectImports (/typescript-4.9.0-dev.20220918/lib/tsserver.js:139006:37)
        at getImportersForExport (/typescript-4.9.0-dev.20220918/lib/tsserver.js:138928:13)
        at State.importTracker (/typescript-4.9.0-dev.20220918/lib/tsserver.js:138904:26)
        at State.getImportSearches (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140462:33)
        at searchForImportsOfExport (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140511:32)
        at getImportOrExportReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:141004:21)
        at getReferencesAtLocation (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140924:17)
        at getReferencesInContainer (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140858:21)
        at getReferencesInContainerOrFiles (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140357:21)
        at getReferencedSymbolsForSymbol (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140348:21)
        at getReferencedSymbolsForModuleIfDeclaredBySourceFile (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140165:67)
        at Object.getReferencedSymbolsForNode (/typescript-4.9.0-dev.20220918/lib/tsserver.js:140091:40)
        at Object.findReferencedSymbols (/typescript-4.9.0-dev.20220918/lib/tsserver.js:139679:42)
        at Object.findReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:168560:41)
        at /typescript-4.9.0-dev.20220918/lib/tsserver.js:178715:53
        at searchPosition (/typescript-4.9.0-dev.20220918/lib/tsserver.js:178912:38)
        at getPerProjectReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:178880:42)
        at getReferencesWorker (/typescript-4.9.0-dev.20220918/lib/tsserver.js:178712:37)
        at IOSession.Session.getReferences (/typescript-4.9.0-dev.20220918/lib/tsserver.js:180315:34)
        at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/typescript-4.9.0-dev.20220918/lib/tsserver.js:179152:61)
        at /typescript-4.9.0-dev.20220918/lib/tsserver.js:181286:96
        at IOSession.Session.executeWithRequestId (/typescript-4.9.0-dev.20220918/lib/tsserver.js:181277:28)
        at IOSession.Session.executeCommand (/typescript-4.9.0-dev.20220918/lib/tsserver.js:181286:41)
        at IOSession.Session.onMessage (/typescript-4.9.0-dev.20220918/lib/tsserver.js:181314:35)
        at Interface.<anonymous> (/typescript-4.9.0-dev.20220918/lib/tsserver.js:185436:31)
    

    Last few requests

    {"seq":6498,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":6,"offset":32,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":2,"triggerCharacter":" "}}
    {"seq":6499,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":20,"offset":7,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":2,"triggerCharacter":" "}}
    {"seq":6500,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":21,"offset":66}}
    {"seq":6501,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/packages/playwright-core/src/utilsBundle.ts","line":21,"offset":66}}
    

    Repro Steps

    1. git clone https://github.com/microsoft/playwright --recurse-submodule
    2. In dir playwright, run git reset --hard ee83694372e2cd8a03131c042189a5359504f1b6
    3. Install packages (exact steps below, but probably easier to follow repo readme)
      1. In dir playwright/examples/components-vue, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      2. In dir playwright/examples/github-api, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      3. In dir playwright/examples/mock-battery, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      4. In dir playwright/examples/mock-filesystem, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      5. In dir playwright/examples/svgomg, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      6. In dir playwright/examples/todomvc, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      7. In dir playwright, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      8. In dir playwright/packages/html-reporter, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      9. In dir playwright/packages/playwright-chromium, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      10. In dir playwright/packages/playwright-core/bundles/utils, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      11. In dir playwright/packages/playwright-core/bundles/zip, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      12. In dir playwright/packages/playwright-core, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      13. In dir playwright/packages/playwright-ct-react, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      14. In dir playwright/packages/playwright-ct-solid, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      15. In dir playwright/packages/playwright-ct-svelte, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      16. In dir playwright/packages/playwright-ct-vue, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      17. In dir playwright/packages/playwright-ct-vue2, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      18. In dir playwright/packages/playwright-firefox, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      19. In dir playwright/packages/playwright-test/bundles/babel, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      20. In dir playwright/packages/playwright-test/bundles/expect, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      21. In dir playwright/packages/playwright-test/bundles/utils, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      22. In dir playwright/packages/playwright-test, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      23. In dir playwright/packages/playwright-webkit, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      24. In dir playwright/packages/playwright, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      25. In dir playwright/packages/recorder, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      26. In dir playwright/packages/trace-viewer, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      27. In dir playwright/tests/components/ct-react-vite, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      28. In dir playwright/tests/components/ct-react, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      29. In dir playwright/tests/components/ct-solid, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      30. In dir playwright/tests/components/ct-svelte-vite, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      31. In dir playwright/tests/components/ct-svelte, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      32. In dir playwright/tests/components/ct-vue-cli, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      33. In dir playwright/tests/components/ct-vue-vite, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      34. In dir playwright/tests/components/ct-vue2-cli, run npm install --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      35. In dir playwright/tests/playwright-test/stable-test-runner, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
      36. In dir playwright/utils/flakiness-dashboard, run npm ci --prefer-offline --no-audit --no-progress --legacy-peer-deps --ignore-scripts -q
    4. Download RepoResults1/microsoft.playwright.replay.txt from the artifact folder
    5. npm install --no-save @typescript/server-replay
    6. npx tsreplay ./playwright ./microsoft.playwright.replay.txt path/to/tsserver.js
  2. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptCrawler-DetectedDetected by a crawler running random TSServer operations on public code.Domain: LS: Auto-importFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions