René's URL Explorer Experiment


Title: NullReferenceException in OnInitialize on Linux when the initialize request includes workspaceFolders (v4.6.0) · Issue #2300 · PowerShell/PowerShellEditorServices · GitHub

Open Graph Title: NullReferenceException in OnInitialize on Linux when the initialize request includes workspaceFolders (v4.6.0) · Issue #2300 · PowerShell/PowerShellEditorServices

X Title: NullReferenceException in OnInitialize on Linux when the initialize request includes workspaceFolders (v4.6.0) · Issue #2300 · PowerShell/PowerShellEditorServices

Description: On PSES v4.6.0 running on Linux, an LSP initialize whose params include a workspaceFolders array throws a NullReferenceException inside the server's own OnInitialize handler, on the path that adds the workspace folders. The handshake doe...

Open Graph Description: On PSES v4.6.0 running on Linux, an LSP initialize whose params include a workspaceFolders array throws a NullReferenceException inside the server's own OnInitialize handler, on the path that adds ...

X Description: On PSES v4.6.0 running on Linux, an LSP initialize whose params include a workspaceFolders array throws a NullReferenceException inside the server's own OnInitialize handler, on the path that a...

Opengraph URL: https://github.com/PowerShell/PowerShellEditorServices/issues/2300

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NullReferenceException in OnInitialize on Linux when the initialize request includes workspaceFolders (v4.6.0)","articleBody":"On PSES `v4.6.0` running on Linux, an LSP `initialize` whose `params` include a\n`workspaceFolders` array throws a `NullReferenceException` inside the server's own\n`OnInitialize` handler, on the path that adds the workspace folders. The handshake\ndoes not complete -- no `initialize` response is returned -- so the server is unusable\nfor any client that sends `workspaceFolders` on this platform.\n\nThe same `initialize`, byte-for-byte, completes normally on Windows. Dropping\n`workspaceFolders` and relying on `rootUri` alone avoids the exception on Linux. The\nplatform asymmetry is the notable part: a client whose handshake is verified on\nWindows silently fails on Linux at exactly this step.\n\nThis is distinct from the rename-handler NRE (#2297 / PR #2299): different trigger\n(`workspaceFolders`, not an omitted `rename` capability), a different code path, and\nLinux-only rather than cross-platform.\n\n## Environment\n\n- PSES: `v4.6.0` (GitHub release asset `PowerShellEditorServices.zip`)\n- Host: PowerShell 7 (`pwsh`)\n- OS: Linux (reproduced on the GitHub Actions `ubuntu-latest` runner); **Windows is unaffected**\n- Transport: `Start-EditorServices.ps1 -Stdio`\n\n## Steps to reproduce\n\n1. Launch PSES over stdio on Linux with `-NoLogo -NoProfile`, logging to a file.\n\n2. Send an LSP `initialize` whose `params` include a `workspaceFolders` array, e.g.:\n\n   ```json\n   {\n     \"processId\": 12345,\n     \"clientInfo\": { \"name\": \"repro\", \"version\": \"1.0.0\" },\n     \"rootUri\": \"file:///home/runner/work/example\",\n     \"workspaceFolders\": [\n       { \"uri\": \"file:///home/runner/work/example\", \"name\": \"workspace\" }\n     ],\n     \"capabilities\": { \"textDocument\": { \"rename\": { \"prepareSupport\": false } } }\n   }\n   ```\n\n   (The `rename` capability is declared deliberately, to keep the separate v4.6.0\n   PrepareRename NRE -- #2297 -- out of the picture; this report is about\n   `workspaceFolders`.)\n\n3. Observe on Linux: no `initialize` **response** is returned, and the PSES log\n   records a `NullReferenceException` in the `OnInitialize` handler on the\n   workspace-folders add path. The NRE stack captured during debugging points at\n   `PsesLanguageServer.cs` around the `OnInitialize` workspaceFolders handling\n   (line numbers should be confirmed against the v4.6.0 source by a maintainer).\n\n## The one-line delta that proves the cause\n\nRe-send the same `initialize` with **`workspaceFolders` removed** and nothing else\nchanged:\n\n   ```json\n   {\n     \"processId\": 12345,\n     \"clientInfo\": { \"name\": \"repro\", \"version\": \"1.0.0\" },\n     \"rootUri\": \"file:///home/runner/work/example\",\n     \"capabilities\": { \"textDocument\": { \"rename\": { \"prepareSupport\": false } } }\n   }\n   ```\n\nOn Linux the handshake now completes and diagnostics flow. The only difference is the\npresence of the `workspaceFolders` array.\n\n## Expected\n\nSending `workspaceFolders` on `initialize` -- a standard, optional LSP field -- must\nnot throw inside `OnInitialize`. The workspace-folders add path should null-guard\nwhatever it dereferences (treat an empty/uninitialized collection as \"no folders yet\")\nrather than throwing, and it must behave the same on Linux as on Windows.\n\n## Context\n\nFound while building a Claude Code plugin that drives PSES over stdio\n(https://github.com/manderse21/claude-powershell-lsp). The plugin's Windows CI legs\nalways passed this handshake; only the Linux leg surfaced the NRE. The plugin now\nomits `workspaceFolders` to work around it (it opens each file explicitly via\n`didOpen`/`didChange`, so multi-root folders are not needed for diagnostics), but the\nroot cause should be fixed for any client that legitimately sends `workspaceFolders`\non Linux.\n","author":{"url":"https://github.com/manderse21","@type":"Person","name":"manderse21"},"datePublished":"2026-06-10T14:50:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2300/PowerShellEditorServices/issues/2300"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f008ebda-3f57-c764-29eb-b72e602fcbc1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC3C:305E50:527AD28:740E627:6A570E26
html-safe-nonceb29aada20bac4ccd67a6ccac060f4f96aea0d5a261815b1bc66311e04a564a04
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzNDOjMwNUU1MDo1MjdBRDI4Ojc0MEU2Mjc6NkE1NzBFMjYiLCJ2aXNpdG9yX2lkIjoiMjU0MzA1NzA0NDA1MzEwMjExOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc05f890dcac6fac7eed924ee0439c759e78de18b801d181ba45f97b5c2460026
hovercard-subject-tagissue:4632352588
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShellEditorServices/2300/issue_layout
twitter:imagehttps://opengraph.githubassets.com/20aa15170c6bccb1a039608ce6373c94450f9b47d1f980f6cf302f8de5a8accd/PowerShell/PowerShellEditorServices/issues/2300
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/20aa15170c6bccb1a039608ce6373c94450f9b47d1f980f6cf302f8de5a8accd/PowerShell/PowerShellEditorServices/issues/2300
og:image:altOn PSES v4.6.0 running on Linux, an LSP initialize whose params include a workspaceFolders array throws a NullReferenceException inside the server's own OnInitialize handler, on the path that adds ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemanderse21
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShellEditorServices git https://github.com/PowerShell/PowerShellEditorServices.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id36031537
octolytics-dimension-repository_nwoPowerShell/PowerShellEditorServices
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36031537
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShellEditorServices
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2576d1f0198cf1588faf2edf27f1ed120903be10
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PowerShellEditorServices/issues/2300#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShellEditorServices%2Fissues%2F2300
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShellEditorServices%2Fissues%2F2300
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShellEditorServices
Reloadhttps://github.com/PowerShell/PowerShellEditorServices/issues/2300
Reloadhttps://github.com/PowerShell/PowerShellEditorServices/issues/2300
Reloadhttps://github.com/PowerShell/PowerShellEditorServices/issues/2300
Please reload this pagehttps://github.com/PowerShell/PowerShellEditorServices/issues/2300
PowerShell https://github.com/PowerShell
PowerShellEditorServiceshttps://github.com/PowerShell/PowerShellEditorServices
Notifications https://github.com/login?return_to=%2FPowerShell%2FPowerShellEditorServices
Fork 260 https://github.com/login?return_to=%2FPowerShell%2FPowerShellEditorServices
Star 759 https://github.com/login?return_to=%2FPowerShell%2FPowerShellEditorServices
Code https://github.com/PowerShell/PowerShellEditorServices
Issues 127 https://github.com/PowerShell/PowerShellEditorServices/issues
Pull requests 14 https://github.com/PowerShell/PowerShellEditorServices/pulls
Actions https://github.com/PowerShell/PowerShellEditorServices/actions
Security and quality 0 https://github.com/PowerShell/PowerShellEditorServices/security
Insights https://github.com/PowerShell/PowerShellEditorServices/pulse
Code https://github.com/PowerShell/PowerShellEditorServices
Issues https://github.com/PowerShell/PowerShellEditorServices/issues
Pull requests https://github.com/PowerShell/PowerShellEditorServices/pulls
Actions https://github.com/PowerShell/PowerShellEditorServices/actions
Security and quality https://github.com/PowerShell/PowerShellEditorServices/security
Insights https://github.com/PowerShell/PowerShellEditorServices/pulse
#2308https://github.com/PowerShell/PowerShellEditorServices/pull/2308
NullReferenceException in OnInitialize on Linux when the initialize request includes workspaceFolders (v4.6.0)https://github.com/PowerShell/PowerShellEditorServices/issues/2300#top
#2308https://github.com/PowerShell/PowerShellEditorServices/pull/2308
https://github.com/andyleejordan
https://github.com/copilot-swe-agent
https://github.com/manderse21
manderse21https://github.com/manderse21
on Jun 10, 2026https://github.com/PowerShell/PowerShellEditorServices/issues/2300#issue-4632352588
#2297https://github.com/PowerShell/PowerShellEditorServices/issues/2297
#2299https://github.com/PowerShell/PowerShellEditorServices/pull/2299
PrepareRename throws NullReferenceException when an LSP client omits the rename capability (v4.6.0) #2297https://github.com/PowerShell/PowerShellEditorServices/issues/2297
https://github.com/manderse21/claude-powershell-lsphttps://github.com/manderse21/claude-powershell-lsp
andyleejordanhttps://github.com/andyleejordan
Copilothttps://github.com/apps/copilot-swe-agent
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.