tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
85.52k stars 2.58k forks source link

[bug] failed to bundle project: failed to decode certificate #11634

Open louis030195 opened 2 weeks ago

louis030195 commented 2 weeks ago

Describe the bug

https://github.com/mediar-ai/screenpipe

getting

failed to bundle project: failed to decode certificate

when running bun tauri build

bun tauri dev works

i tried to remove updater config, turn off signing, or such, without success

considering this is very likely a problem on my side but i did not find any similar issue neither on github or discord so if you have any idea how i could fix/investigate this?

our updater and apple signing works well in production so i doubt it is broken certificates?

maybe some dependency i need to update or anything?

other people with same computer than me don't have this issue for the same project

Reproduction

I don't know

Expected behavior

No response

Full tauri info output

(env) (base) louisbeaumont@mac:~/Documents/screen-pipe/screenpipe-app-tauri$ bun tauri info
$ echo 'Warning: did you run bun scripts/pre_build.js and ALL other instructions carefully listed in https://docs.screenpi.pe/docs/getting-started ?' && tauri info
Warning: did you run bun scripts/pre_build.js and ALL other instructions carefully listed in https://docs.screenpi.pe/docs/getting-started ?
WARNING: Only one package manager should be used, but found npm and pnpm and bun.
         Please remove unused package manager lock files, will use npm for now!

[✔] Environment
    - OS: Mac OS 15.1.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.9.0
    - pnpm: 8.7.4
    - yarn: 1.22.19
    - npm: 10.1.0
    - bun: 1.1.21

[-] Packages
    - tauri 🦀: 2.0.0
    - tauri-build 🦀: 2.0.0
    - wry 🦀: 0.44.1
    - tao 🦀: 0.30.2
    - tauri-cli 🦀: 1.6.2
    - @tauri-apps/api : 2.0.1 (outdated, latest: 2.1.0)
    - @tauri-apps/cli : 2.0.0 (outdated, latest: 2.1.0)

[-] Plugins
    - tauri-plugin-store 🦀: 2.0.0
    - @tauri-apps/plugin-store : 2.0.0 (outdated, latest: 2.1.0)
    - tauri-plugin-single-instance 🦀: 2.0.0
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-autostart 🦀: 2.0.0
    - @tauri-apps/plugin-autostart : not installed!
    - tauri-plugin-fs 🦀: 2.0.0
    - @tauri-apps/plugin-fs : 2.0.0 (outdated, latest: 2.0.2)
    - tauri-plugin-dialog 🦀: 2.0.0
    - @tauri-apps/plugin-dialog : 2.0.0 (outdated, latest: 2.0.1)
    - tauri-plugin-cli 🦀: 2.0.0
    - @tauri-apps/plugin-cli : 2.0.0
    - tauri-plugin-notification 🦀: 2.0.0
    - @tauri-apps/plugin-notification : 2.0.0
    - tauri-plugin-shell 🦀: 2.0.0
    - @tauri-apps/plugin-shell : 2.0.0 (outdated, latest: 2.0.1)
    - tauri-plugin-process 🦀: 2.0.0
    - @tauri-apps/plugin-process : 2.0.0
    - tauri-plugin-global-shortcut 🦀: 2.0.0
    - @tauri-apps/plugin-global-shortcut : 2.0.0
    - tauri-plugin-updater 🦀: 2.0.1
    - @tauri-apps/plugin-updater : 2.0.0
    - tauri-plugin-os 🦀: 2.0.0
    - @tauri-apps/plugin-os : 2.0.0

[-] App
    - build-type: bundle
    - CSP: frame-src https://www.youtube.com http://localhost:*; img-src 'self' asset: http://asset.localhost blob: data: https://*.githubusercontent.com https://*.github.com https://github.com https://*.s3.amazonaws.com; font-src https://fonts.gstatic.com tauri://localhost http://tauri.localhost; default-src 'self' customprotocol: asset:; connect-src ipc: http://ipc.localhost https://youtube.com https://api.openai.com http://localhost:3030 https://web.crabnebula.cloud https://api.github.com https://eu.i.posthog.com https://github.com https://*.githubusercontent.com https://*.github.com http://*:11434 http://*:9000 https://ai-proxy.i-f9f.workers.dev *; style-src 'unsafe-inline' 'self' https://fonts.googleapis.com tauri://localhost http://tauri.localhost http://localhost:* data: *; media-src 'self' mediadevices: asset: http://asset.localhost file: blob: tauri://localhost file: blob: https://youtube.com https://github.com https://youtu.be
    - frontendDist: ../out
    - devUrl: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack
(env) (base) louisbeaumont@mac:~/Documents/screen-pipe/screenpipe-app-tauri$ 

Stack trace

(env) (base) louisbeaumont@mac:~/Documents/screen-pipe/screenpipe-app-tauri$ bun tauri build -v
$ echo 'Warning: did you run bun scripts/pre_build.js and ALL other instructions carefully listed in https://docs.screenpi.pe/docs/getting-started ?' && tauri build -v
Warning: did you run bun scripts/pre_build.js and ALL other instructions carefully listed in https://docs.screenpi.pe/docs/getting-started ?
    Running [tauri_cli::helpers] beforeBuildCommand `bun run build`
    Debug [tauri_cli::helpers] Setting environment for hook {"TAURI_ENV_PLATFORM_VERSION": "15.1.0", "TAURI_ENV_FAMILY": "unix", "TAURI_ENV_ARCH": "aarch64", "TAURI_ENV_PLATFORM": "darwin", "TAURI_ENV_TARGET_TRIPLE": "aarch64-apple-darwin"}
    Running [tauri_cli] Command `sh  -c bun run build`
$ bun scripts/pre_build.js
cwd /Users/louisbeaumont/Documents/screen-pipe/screenpipe-app-tauri/src-tauri
Setting up screenpipe bin for arm64...
Copied most recent arm64 screenpipe binary from ../../target/release/screenpipe
Updated dylib paths for arm64 in dev mode
screenpipe for arm64 set up successfully.
Setting up screenpipe bin for x86_64...
No suitable x86_64 screenpipe binary found
screenpipe for x86_64 set up successfully.
FFMPEG already exists
Moved and renamed ffmpeg binary for externalBin

Commands to build 🔨:
bun install
bun tauri build
bun is already installed.
checking bun binary for tauri...
bun binary already exists for tauri.
ollama sidecar already exists. skipping installation.
$ next build
  ▲ Next.js 14.2.4
  - Environments: .env

   Creating an optimized production build ...
 ✓ Compiled successfully

./app/timeline/page.tsx
180:38  Warning: The ref value 'retryTimeoutRef.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'retryTimeoutRef.current' to a variable inside the effect, and use that variable in the cleanup function.  react-hooks/exhaustive-deps
326:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/meeting-history.tsx
168:6  Warning: React Hook useEffect has a missing dependency: 'loadMeetings'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/onboarding/api-setup.tsx
281:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/dev-configuration.tsx
88:6  Warning: React Hook useEffect has a missing dependency: 'devInstructionsData'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
93:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/dev-or-non-dev.tsx
109:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/explain-instructions.tsx
27:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/introduction.tsx
18:7  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/personalize.tsx
84:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/pipes.tsx
22:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/status.tsx
154:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/onboarding/usecases-selection.tsx
97:9  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/pipe-store.tsx
102:6  Warning: React Hook useEffect has a missing dependency: 'fetchInstalledPipes'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
563:21  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/recording-settings.tsx
201:6  Warning: React Hook useEffect has missing dependencies: 'localSettings' and 'setLocalSettings'. Either include them or remove the dependency array. If 'setLocalSettings' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/search-chat.tsx
395:6  Warning: React Hook useEffect has a missing dependency: 'handleFilterDuplicates'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
859:31  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element
866:31  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/timeline/timeline-dock-section.tsx
193:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/video.tsx
81:6  Warning: React Hook useEffect has missing dependencies: 'getMimeType' and 'mediaSrc'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/use-pipes.tsx
308:6  Warning: React Hook useEffect has missing dependencies: 'loading' and 'pipes'. Either include them or remove the dependency array. You can also do a functional update 'setPipes(p => ...)' if you only need 'pipes' in the 'setPipes' call.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
 ✓ Linting and checking validity of types    
 ✓ Collecting page data    
 ✓ Generating static pages (6/6)
 ✓ Collecting build traces    
 ✓ Finalizing page optimization    

Route (app)                              Size     First Load JS
┌ ○ /                                    158 kB          706 kB
├ ○ /_not-found                          142 B          87.5 kB
└ ○ /timeline                            9.4 kB          521 kB
+ First Load JS shared by all            87.4 kB
  ├ chunks/145-58c11cb1cc61485d.js       31.8 kB
  ├ chunks/5f51b337-170ce1bbdb264049.js  53.7 kB
  └ other shared chunks (total)          1.97 kB

○  (Static)  prerendered as static content

    Running [tauri_cli] Command `cargo  build --bins --features tauri/custom-protocol,tauri/native-tls --release`
   Compiling screenpipe-app v0.10.0 (/Users/louisbeaumont/Documents/screen-pipe/screenpipe-app-tauri/src-tauri)
    Finished `release` profile [optimized] target(s) in 28.26s
    Built [tauri_cli::build] application at: /Users/louisbeaumont/Documents/screen-pipe/screenpipe-app-tauri/src-tauri/target/release/screenpipe-app
    Bundling [tauri_bundler::bundle::macos::app] screenpipe.app (/Users/louisbeaumont/Documents/screen-pipe/screenpipe-app-tauri/src-tauri/target/release/bundle/macos/screenpipe.app)
    Running [tauri_macos_sign] Command `base64  --decode -i /var/folders/hq/swhzs3js29z7mb5b7ycnjcnm0000gn/T/.tmpx2Oz9R/src -o /var/folders/hq/swhzs3js29z7mb5b7ycnjcnm0000gn/T/.tmpSuFtHm/cert.p12`
base64: /var/folders/hq/swhzs3js29z7mb5b7ycnjcnm0000gn/T/.tmpx2Oz9R/src: (null): error decoding base64 input stream
failed to bundle project: failed to decode certificate
    Error [tauri_cli_node] failed to bundle project: failed to decode certificate
error: script "tauri" exited with code 1
(env) (base) louisbeaumont@mac:~/Documents/screen-pipe/screenpipe-app-tauri$ 

Additional context

macos m3 max 15.1 36gb