toeverything / AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
https://affine.pro
Other
36.01k stars 2.38k forks source link

​Failed to run v0.14.6 in deepin 20.9 #7093

Open Javier-Huang opened 2 months ago

Javier-Huang commented 2 months ago

What happened?

I can run 0.13.5, but i cannot run 0.14.6.

Log:

 ~/Downloads  ./affine-0.14.6-stable-linux-x64.appimage                                                                                                                                    ok 
16:15:14.446 (main) › [ipc-event] updater:onDownloadProgress [ 0 ]
16:15:14.458 (main) › auto-updater feed config {
  channel: 'stable',
  provider: 'custom',
  repo: 'AFFiNE',
  owner: 'toeverything',
  releaseType: 'release',
  updateProvider: '[function] class extends import_GitHubProvider.BaseGitHubProvider {\n' +
    '      constructor(options, updater, runtimeOptions) {\n' +
    '        super(options, "github.com", runtimeOptions);\n' +
    '        this.updater = updater;\n' +
    '      }\n' +
    '      async getLatestVersion() {\n' +
    '        const cancellationToken = new import_electron_updater.CancellationToken();\n' +
    '        const feedXml = await this.httpRequest(\n' +
    '          newUrlFromBase(`${this.basePath}.atom`, this.baseUrl),\n' +
    '          {\n' +
    '            accept: "application/xml, application/atom+xml, text/xml, */*"\n' +
    '          },\n' +
    '          cancellationToken\n' +
    '        );\n' +
    '        if (!feedXml) {\n' +
    '          throw new Error(\n' +
    '            `Cannot find feed in the remote server (${this.baseUrl.href})`\n' +
    '          );\n' +
    '        }\n' +
    '        const feed = (0, import_builder_util_runtime.parseXml)(feedXml);\n' +
    '        let latestRelease = feed.element(\n' +
    '          "entry",\n' +
    '          false,\n' +
    '          `No published versions on GitHub`\n' +
    '        );\n' +
    '        let tag = null;\n' +
    '        try {\n' +
    '          const currentChannel = this.options.channel || this.updater?.channel || semver.prerelease(this.updater.currentVersion)?.[0] || null;\n' +
    '          if (currentChannel === null) {\n' +
    '            throw (0, import_builder_util_runtime.newError)(\n' +
    '              `Cannot parse channel from version: ${this.updater.currentVersion}`,\n' +
    '              "ERR_UPDATER_INVALID_VERSION"\n' +
    '            );\n' +
    '          }\n' +
    '          const releaseTag = await this.getLatestTagByRelease(\n' +
    '            currentChannel,\n' +
    '            cancellationToken\n' +
    '          );\n' +
    '          for (const element of feed.getElements("entry")) {\n' +
    '            const hrefElement = hrefRegExp.exec(\n' +
    '              element.element("link").attribute("href")\n' +
    '            );\n' +
    '            if (hrefElement === null) continue;\n' +
    '            const hrefTag = hrefElement[1];\n' +
    '            const hrefChannel = semver.prerelease(hrefTag)?.[0] || "stable";\n' +
    '            let isNextPreRelease = false;\n' +
    '            if (releaseTag) {\n' +
    '              isNextPreRelease = releaseTag === hrefTag;\n' +
    '            } else {\n' +
    '              isNextPreRelease = hrefChannel === currentChannel;\n' +
    '            }\n' +
    '            if (isNextPreRelease) {\n' +
    '              tag = hrefTag;\n' +
    '              latestRelease = element;\n' +
    '              break;\n' +
    '            }\n' +
    '          }\n' +
    '        } catch (e) {\n' +
    '          throw (0, import_builder_util_runtime.newError)(\n' +
    '            `Cannot parse releases feed: ${e.stack || e.message},\n' +
    'XML:\n' +
    '${feedXml}`,\n' +
    '            "ERR_UPDATER_INVALID_RELEASE_FEED"\n' +
    '          );\n' +
    '        }\n' +
    '        if (tag === null || tag === void 0) {\n' +
    '          throw (0, import_builder_util_runtime.newError)(\n' +
    '            `No published versions on GitHub`,\n' +
    '            "ERR_UPDATER_NO_PUBLISHED_VERSIONS"\n' +
    '          );\n' +
    '        }\n' +
    '        let rawData = null;\n' +
    '        let channelFile = "";\n' +
    '        let channelFileUrl = "";\n' +
    '        const fetchData = async (channelName) => {\n' +
    '          channelFile = getChannelFilename(channelName);\n' +
    '          channelFileUrl = newUrlFromBase(\n' +
    '            this.getBaseDownloadPath(String(tag), channelFile),\n' +
    '            this.baseUrl\n' +
    '          );\n' +
    '          const requestOptions = this.createRequestOptions(channelFileUrl);\n' +
    '          try {\n' +
    '            return await this.executor.request(requestOptions, cancellationToken);\n' +
    '          } catch (e) {\n' +
    '            if (e instanceof import_builder_util_runtime.HttpError && e.statusCode === 404) {\n' +
    '              throw (0, import_builder_util_runtime.newError)(\n' +
    '                `Cannot find ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}`,\n' +
    '                "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"\n' +
    '              );\n' +
    '            }\n' +
    '            throw e;\n' +
    '          }\n' +
    '        };\n' +
    '        try {\n' +
    '          const channel = this.updater.allowPrerelease ? this.getCustomChannelName(\n' +
    '            String(semver.prerelease(tag)?.[0] || "latest")\n' +
    '          ) : this.getDefaultChannelName();\n' +
    '          rawData = await fetchData(channel);\n' +
    '        } catch (e) {\n' +
    '          if (this.updater.allowPrerelease) {\n' +
    '            rawData = await fetchData(this.getDefaultChannelName());\n' +
    '          } else {\n' +
    '            throw e;\n' +
    '          }\n' +
    '        }\n' +
    '        const result = (0, import_Provider.parseUpdateInfo)(rawData, channelFile, channelFileUrl);\n' +
    '        if (result.releaseName == null) {\n' +
    '          result.releaseName = latestRelease.elementValueOrEmpty("title");\n' +
    '        }\n' +
    '        if (result.releaseNotes == null) {\n' +
    '          result.releaseNotes = computeReleaseNotes(\n' +
    '            this.updater.currentVersion,\n' +
    '            this.updater.fullChangelog,\n' +
    '            feed,\n' +
    '            latestRelease\n' +
    '          );\n' +
    '        }\n' +
    '        return {\n' +
    '          tag,\n' +
    '          ...result\n' +
    '        };\n' +
    '      }\n' +
    '      get basePath() {\n' +
    '        return `/${this.options.owner}/${this.options.repo}/releases`;\n' +
    '      }\n' +
    '      /**\n' +
    '       * Use release api to get latest version to filter draft version.\n' +
    '       * But this api have low request limit 60-times/1-hour, use this to help, not depend on it\n' +
    '       * https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28\n' +
    '       * https://api.github.com/repos/toeverything/affine/releases\n' +
    '       * https://docs.github.com/en/rest/rate-limit/rate-limit?apiVersion=2022-11-28#about-rate-limits\n' +
    '       */\n' +
    '      async getLatestTagByRelease(currentChannel, cancellationToken) {\n' +
    '        try {\n' +
    '          const releasesStr = await this.httpRequest(\n' +
    '            newUrlFromBase(`/repos${this.basePath}`, this.baseApiUrl),\n' +
    '            {\n' +
    '              accept: "Accept: application/vnd.github+json",\n' +
    '              "X-GitHub-Api-Version": "2022-11-28"\n' +
    '            },\n' +
    '            cancellationToken\n' +
    '          );\n' +
    '          if (!releasesStr) {\n' +
    '            return null;\n' +
    '          }\n' +
    '          const releases = JSON.parse(releasesStr);\n' +
    '          for (const release2 of releases) {\n' +
    '            if (release2.draft) {\n' +
    '              continue;\n' +
    '            }\n' +
    '            const releaseTag = release2.tag_name;\n' +
    '            const releaseChannel = semver.prerelease(releaseTag)?.[0] || "stable";\n' +
    '            if (releaseChannel === currentChannel) {\n' +
    '              return release2.tag_name;\n' +
    '            }\n' +
    '          }\n' +
    '        } catch (e) {\n' +
    '          console.info(`Cannot parse release: ${e.stack || e.message}`);\n' +
    '        }\n' +
    '        return null;\n' +
    '      }\n' +
    '      resolveFiles(updateInfo) {\n' +
    '        const filteredUpdateInfo = structuredClone(updateInfo);\n' +
    '        if (process.platform === "win32" && updateInfo.files.length > 1) {\n' +
    '          const isSquirrel = isSquirrelBuild();\n' +
    '          filteredUpdateInfo.files = updateInfo.files.filter((file) => {\n' +
    '            return isSquirrel ? !file.url.includes("nsis.exe") : file.url.includes("nsis.exe");\n' +
    '          });\n' +
    '        }\n' +
    '        return (0, import_Provider.resolveFiles)(\n' +
    '          filteredUpdateInfo,\n' +
    '          this.baseUrl,\n' +
    '          (p) => this.getBaseDownloadPath(filteredUpdateInfo.tag, p.replace(/ /g, "-"))\n' +
    '        );\n' +
    '      }\n' +
    '      getBaseDownloadPath(tag, fileName) {\n' +
    '        return `${this.basePath}/download/${tag}/${fileName}`;\n' +
    '      }\n' +
    '    }'
}
16:15:14.472 (main) › [helper] forked 111894
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
16:15:14.742 (main) › create window
16:15:14.852 (main) › loading page at file://.
16:15:14.928 (main) › [ipc-event] ui:onMaximized [ true ]
[1]    111830 trace trap  ./affine-0.14.6-stable-linux-x64.appimage

Distribution version

Linux

What browsers are you seeing the problem on if you're using web version?

No response

Are you self-hosting?

Relevant log output

No response

Anything else?

No response

affine-issue-bot[bot] commented 2 months ago

Issue Status: 🧑‍💻 To Reproduce

🧑‍💻 To Reproduce

We will try to find the steps needed to reproduce the issue on our side.

This is an automatic reply by the bot.