René's URL Explorer Experiment


Title: [bug] Gitea sync fails with ERR_STREAM_PREMATURE_CLOSE, then crashes on null full_name · Issue #1404 · sourcebot-dev/sourcebot · GitHub

Open Graph Title: [bug] Gitea sync fails with ERR_STREAM_PREMATURE_CLOSE, then crashes on null full_name · Issue #1404 · sourcebot-dev/sourcebot

X Title: [bug] Gitea sync fails with ERR_STREAM_PREMATURE_CLOSE, then crashes on null full_name · Issue #1404 · sourcebot-dev/sourcebot

Description: Describe the bug Bug description When syncing repositories from a self-hosted Gitea instance, Sourcebot fails the connection sync job with: Cannot read properties of null (reading 'full_name') After debugging, the root cause appears to b...

Open Graph Description: Describe the bug Bug description When syncing repositories from a self-hosted Gitea instance, Sourcebot fails the connection sync job with: Cannot read properties of null (reading 'full_name') Afte...

X Description: Describe the bug Bug description When syncing repositories from a self-hosted Gitea instance, Sourcebot fails the connection sync job with: Cannot read properties of null (reading 'full_name...

Opengraph URL: https://github.com/sourcebot-dev/sourcebot/issues/1404

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[bug] Gitea sync fails with ERR_STREAM_PREMATURE_CLOSE, then crashes on null full_name","articleBody":"### Describe the bug\n\n## Bug description\n\nWhen syncing repositories from a self-hosted Gitea instance, Sourcebot fails the connection sync job with:\n\n```text\nCannot read properties of null (reading 'full_name')\n```\n\nAfter debugging, the root cause appears to be that gitea-js / cross-fetch fails while reading the Gitea API response body with:\n\n```text\nERR_STREAM_PREMATURE_CLOSE\n```\n\nThis causes api.repos.repoGet() to return:\n\n```json\n\n{\n  \"size\": 0,\n  \"timeout\": 0,\n  \"data\": null,\n  \"error\": {\n    \"message\": \"Invalid response body while trying to fetch http://xxxxx:3001/api/v1/repos/xxxx/xxx.xxxx: Premature close\",\n    \"type\": \"system\",\n    \"errno\": \"ERR_STREAM_PREMATURE_CLOSE\",\n    \"code\": \"ERR_STREAM_PREMATURE_CLOSE\"\n  }\n}\n```\nSourcebot then executes this code in /app/packages/backend/dist/gitea.js:\n\n```javascript\n\nreturn {\n    type: 'valid',\n    data: [response.data]\n};\n```\nSince response.data is null, allRepos contains null. Later this crashes:\n\n```javascript\nallRepos = allRepos.filter(repo =\u003e repo.full_name !== undefined);\n```\n\n\n\n\n\n\n### To reproduce\n\nInside the Sourcebot container:\n\n```javascript\nimport { giteaApi } from \"gitea-js\";\nimport fetch from \"cross-fetch\";\n\nconst api = giteaApi(\"http://gitea:3001\", {\n  token: process.env.GITEA_TOKEN,\n  customFetch: fetch,\n});\n\nconst response = await api.repos.repoGet(\"Org\", \"Repo\");\n\nconsole.log(JSON.stringify(response, null, 2));\n```\n\n```json\n\n{\n  \"size\": 0,\n  \"timeout\": 0,\n  \"data\": null,\n  \"error\": {\n    \"message\": \"Invalid response body while trying to fetch http://gitea:3001/api/v1/repos/Fairparken/Fairparken.Worker: Premature close\",\n    \"type\": \"system\",\n    \"errno\": \"ERR_STREAM_PREMATURE_CLOSE\",\n    \"code\": \"ERR_STREAM_PREMATURE_CLOSE\"\n  }\n}\n```\n\n### Sourcebot deployment information\n\nSourcebot version (e.g. v3.0.1): V5.0.4\nGittea image version: docker.gitea.com/gitea:1.26.1-rootless\n\n\n### Additional information\n\nTemporary workaround tested:\n\nI patched /app/packages/backend/dist/gitea.js inside the running Sourcebot container to use a custom fetch:\n\n```javascript\nconst customFetch = (url, options = {}) =\u003e {\n    const headers = {\n        ...(options.headers ?? {}),\n        'Accept-Encoding': 'identity',\n        'Connection': 'close',\n    };\n\n    return fetch(url, {\n        ...options,\n        headers,\n    });\n};\n\nconst api = giteaApi(config.url ?? 'https://gitea.com', {\n    token: token,\n    customFetch,\n});\n```\n\nI also added a null guard:\n```javascript\n\nallRepos = allRepos.filter((repo, index) =\u003e {\n    if (repo === null || repo === undefined) {\n        logger.warn(`Skipping null/undefined Gitea repo at index ${index}`);\n        return false;\n    }\n    return repo.full_name !== undefined;\n});\n```\n\n# Relevant code locations\n/app/packages/backend/dist/gitea.js:42\n/app/packages/backend/dist/gitea.js:161-166\n/app/packages/backend/dist/repoCompileUtils\n\n\n\n","author":{"url":"https://github.com/HueskenNiels-hue","@type":"Person","name":"HueskenNiels-hue"},"datePublished":"2026-06-30T09:31:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1404/sourcebot/issues/1404"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:dd85afae-b98c-26fe-9040-638e0d9eb7dd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id841E:18D9A8:23E96B6:32F25CF:6A4CDFF8
html-safe-nonce7275965cd79541f56f0a8fc69b64ffc0e387c4700e72c6be5344db55007623c5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDFFOjE4RDlBODoyM0U5NkI2OjMyRjI1Q0Y6NkE0Q0RGRjgiLCJ2aXNpdG9yX2lkIjoiMjgzOTc1NDgzMjI2NDA5MzY4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf49c02d50285d9a658640896ae42eaccd9789c42036cd0e61d80c0a2e865f5da
hovercard-subject-tagissue:4775493901
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/sourcebot-dev/sourcebot/1404/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ae86ea708b8f623651656c0bf1af8b37ed5bc4c9ae9d3c99b45f95dadbc93c67/sourcebot-dev/sourcebot/issues/1404
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ae86ea708b8f623651656c0bf1af8b37ed5bc4c9ae9d3c99b45f95dadbc93c67/sourcebot-dev/sourcebot/issues/1404
og:image:altDescribe the bug Bug description When syncing repositories from a self-hosted Gitea instance, Sourcebot fails the connection sync job with: Cannot read properties of null (reading 'full_name') Afte...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameHueskenNiels-hue
hostnamegithub.com
expected-hostnamegithub.com
None299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8
turbo-cache-controlno-preview
go-importgithub.com/sourcebot-dev/sourcebot git https://github.com/sourcebot-dev/sourcebot.git
octolytics-dimension-user_id135396723
octolytics-dimension-user_loginsourcebot-dev
octolytics-dimension-repository_id846729675
octolytics-dimension-repository_nwosourcebot-dev/sourcebot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id846729675
octolytics-dimension-repository_network_root_nwosourcebot-dev/sourcebot
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
release3eeb74f55ccd8a31bdaec6839577c592bbf7844c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sourcebot-dev/sourcebot/issues/1404#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsourcebot-dev%2Fsourcebot%2Fissues%2F1404
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/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/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/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%2Fsourcebot-dev%2Fsourcebot%2Fissues%2F1404
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=sourcebot-dev%2Fsourcebot
Reloadhttps://github.com/sourcebot-dev/sourcebot/issues/1404
Reloadhttps://github.com/sourcebot-dev/sourcebot/issues/1404
Reloadhttps://github.com/sourcebot-dev/sourcebot/issues/1404
Please reload this pagehttps://github.com/sourcebot-dev/sourcebot/issues/1404
sourcebot-dev https://github.com/sourcebot-dev
sourcebothttps://github.com/sourcebot-dev/sourcebot
Notifications https://github.com/login?return_to=%2Fsourcebot-dev%2Fsourcebot
Fork 315 https://github.com/login?return_to=%2Fsourcebot-dev%2Fsourcebot
Star 3.6k https://github.com/login?return_to=%2Fsourcebot-dev%2Fsourcebot
Code https://github.com/sourcebot-dev/sourcebot
Issues 93 https://github.com/sourcebot-dev/sourcebot/issues
Pull requests 38 https://github.com/sourcebot-dev/sourcebot/pulls
Discussions https://github.com/sourcebot-dev/sourcebot/discussions
Actions https://github.com/sourcebot-dev/sourcebot/actions
Security and quality 0 https://github.com/sourcebot-dev/sourcebot/security
Insights https://github.com/sourcebot-dev/sourcebot/pulse
Code https://github.com/sourcebot-dev/sourcebot
Issues https://github.com/sourcebot-dev/sourcebot/issues
Pull requests https://github.com/sourcebot-dev/sourcebot/pulls
Discussions https://github.com/sourcebot-dev/sourcebot/discussions
Actions https://github.com/sourcebot-dev/sourcebot/actions
Security and quality https://github.com/sourcebot-dev/sourcebot/security
Insights https://github.com/sourcebot-dev/sourcebot/pulse
#1416https://github.com/sourcebot-dev/sourcebot/pull/1416
#1405https://github.com/sourcebot-dev/sourcebot/pull/1405
[bug] Gitea sync fails with ERR_STREAM_PREMATURE_CLOSE, then crashes on null full_namehttps://github.com/sourcebot-dev/sourcebot/issues/1404#top
#1416https://github.com/sourcebot-dev/sourcebot/pull/1416
#1405https://github.com/sourcebot-dev/sourcebot/pull/1405
bugSomething isn't workinghttps://github.com/sourcebot-dev/sourcebot/issues?q=state%3Aopen%20label%3A%22bug%22
triage neededhttps://github.com/sourcebot-dev/sourcebot/issues?q=state%3Aopen%20label%3A%22triage%20needed%22
https://github.com/HueskenNiels-hue
HueskenNiels-huehttps://github.com/HueskenNiels-hue
on Jun 30, 2026https://github.com/sourcebot-dev/sourcebot/issues/1404#issue-4775493901
bugSomething isn't workinghttps://github.com/sourcebot-dev/sourcebot/issues?q=state%3Aopen%20label%3A%22bug%22
triage neededhttps://github.com/sourcebot-dev/sourcebot/issues?q=state%3Aopen%20label%3A%22triage%20needed%22
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.