func icon indicating copy to clipboard operation
func copied to clipboard

Unable to run func run - ERROR: failed to export

Open daniwk opened this issue 1 year ago • 14 comments

I'm trying to follow the quickstart, but can't get any longer than "Building, running or deploying a function".

After I've created a function, the func run command fails. The --verbose flag yields the following logs:

Timer: Saving docker.io/{docker-username}... ran for 19.397334ms and ended at 2024-11-03T18:47:15Z
Timer: Exporter ran for 4.317147961s and ended at 2024-11-03T18:47:15Z
ERROR: failed to export: saving image: failed to fetch base layers: open /tmp/imgutil.local.image.342586074/blobs/sha256/ae6a328f29da50c499acac265e2db256c9e2e2998cf74e0a7972239755dfb667: no such file or directory

I get the same error with both the python (kn func create -l python hello) and go function (kn func create -l go hello). I'm using a MacBook Pro M1 Pro with MacOS 15.1.

Do you have any tips on solving this issue?

daniwk avatar Nov 03 '24 18:11 daniwk

Have you run func run right after build or after deploy?

matejvasek avatar Nov 04 '24 13:11 matejvasek

Which command is failing for you?

matejvasek avatar Nov 04 '24 13:11 matejvasek

@lkingland can you reproduce this?

matejvasek avatar Nov 04 '24 13:11 matejvasek

I am unable to reproduce this; but I don't have an Apple Silicon box at my disposal right now. Can we see kn func version please?

lkingland avatar Nov 04 '24 15:11 lkingland

func version is v0.43.0.

The step to reproduce:

  1. kn func create -l python layer8
  2. cd layer8/
  3. kn func run. Enter docker.io when prompted for registry.

The same procedure works on a colleagues machine (same MacOS, kn and func versions).

daniwk avatar Nov 04 '24 16:11 daniwk

Please try entering your username in the registry field, for example kn func create -l go then kn func run --registry=docker.io/daniwk

lkingland avatar Nov 05 '24 05:11 lkingland

I get the same result when entering the username in the registry field.

daniwk avatar Nov 05 '24 05:11 daniwk

@daniwk did you solve this I have the same issue with python and node function

I am using a MacBook Pro M1 Pro, too but macos 14.6.1

J-ARTS avatar Dec 17 '24 23:12 J-ARTS

Stuck on this as well with a fresh install.

bickfordb avatar Jan 01 '25 20:01 bickfordb

Just encountered this and now stuck on it as well, on v0.43.1

I am using windows

tkhso avatar Jan 15 '25 16:01 tkhso

I'm getting the same error when using pack as builder. On using s2i, the build is successful. version=0.43.1 OS=windows

Saisrinivenkat avatar Feb 11 '25 05:02 Saisrinivenkat

@J-ARTS sorry for answering so late. I picked up knative again in mid January and it started working. Unfortunately, I have no idea what made it work. I'm now on MacOS 15.3.1 and Docker Desktop 4.37.2.

daniwk avatar Feb 11 '25 19:02 daniwk

@daniwk thanks for your reply and sharing your system informations I will give it a try

J-ARTS avatar Feb 11 '25 21:02 J-ARTS

I am having the same case with knative running on Ubuntu Windows WSL with func tools version 0.44.0 ERROR: failed to export: saving image: failed to fetch base layers: open /tmp/imgutil.local.image.2387201438/blobs/sha256/ca508691724188a827469cf570dac5059daa9b9aaebac3c5f3d270c40c5877ad: no such file or directory

Error: failed to build the function: executing lifecycle: failed with status code: 62

manarhusrieh avatar Feb 18 '25 13:02 manarhusrieh

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar May 20 '25 01:05 github-actions[bot]