formbricks / formbricks

Open Source Survey Platform
https://formbricks.com
Other
6.62k stars 1.12k forks source link

[BUG] - Unable to change or delete Avatar #2766

Open pierrejo opened 3 months ago

pierrejo commented 3 months ago

Issue Summary

I make all migration and upload image in form is working

LOG :

No pending migrations to apply.
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g npm@10.8.1
npm notice
  ▲ Next.js 15.0.0-rc.0
  - Local:        http://localhost:3000
  - Network:      http://0.0.0.0:3000

 ✓ Starting...
 ✓ Ready in 180ms

Error: Deletion failed: Deletion failed
    at U (/home/nextjs/apps/web/.next/server/app/(app)/environments/[environmentId]/settings/(account)/profile/page.js:11:13636)
    at async /home/nextjs/apps/web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:128:1202
    at async r$ (/home/nextjs/apps/web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:127:8130)
    at async nn (/home/nextjs/apps/web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:129:1140)
    at async doRender (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1490:34)
    at async responseGenerator (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1652:28)
    at async NextNodeServer.renderToResponseWithComponentsImpl (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1665:28)
    at async NextNodeServer.renderPageComponent (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1978:24)
    at async NextNodeServer.renderToResponseImpl (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:2016:32)
    at async NextNodeServer.pipeImpl (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:908:25) {
  digest: '1690535866'
}

Steps to Reproduce

Just try to change or delete Avatar image

Expected behavior

change or delete Avatar image with success

Other information

No response

Screenshots

2024-06-13_13-04

Environment

edersilva78 commented 3 months ago

Hi, Team Also encoutered this issue. Recently updated to version 2.1.1 Current avatars are not visible. ![Uploading image.png…]()

formbricks-formbricks-1 |  ⨯ upstream image response failed for https://forms.institutomix.com.br/storage/cllw9vnu60003o03dwu5kufcc/public/IMG_2640--fid--2a21d49f-8780-4211-a4cf-65a67a44a687.JPG 404
formbricks-formbricks-1 | Error: Deletion failed: Deletion failed
formbricks-formbricks-1 |     at U (/home/nextjs/apps/web/.next/server/app/(app)/environments/[environmentId]/settings/(account)/profile/page.js:11:13636)
formbricks-formbricks-1 |     at async /home/nextjs/apps/web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:128:1202
formbricks-formbricks-1 |     at async r$ (/home/nextjs/apps/web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:127:8130)
formbricks-formbricks-1 |     at async nn (/home/nextjs/apps/web/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:129:1140)
formbricks-formbricks-1 |     at async doRender (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1490:34)
formbricks-formbricks-1 |     at async responseGenerator (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1652:28)
formbricks-formbricks-1 |     at async NextNodeServer.renderToResponseWithComponentsImpl (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1665:28)
formbricks-formbricks-1 |     at async NextNodeServer.renderPageComponent (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:1978:24)
formbricks-formbricks-1 |     at async NextNodeServer.renderToResponseImpl (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:2016:32)
formbricks-formbricks-1 |     at async NextNodeServer.pipeImpl (/home/nextjs/apps/web/node_modules/next/dist/server/base-server.js:908:25) {
formbricks-formbricks-1 |   digest: '1690535866'
formbricks-formbricks-1 | }
mattinannt commented 3 months ago

@Dhruwang Can you please look into this and see if you can reproduce and solve the issue? :-)

smritidoneria commented 3 months ago

I am encountering an issue where the avatar deletion and update functionalities work perfectly in the local environment but fail to operate as expected on Formbricks Cloud.

ag-gaphp commented 2 months ago

@edersilva78 & @pierrejo If you're able to check, what are the permissions on your uploads directory? This could be related to #2694

edersilva78 commented 2 months ago

Hi, @ag-gaphp

Thanks for your repply.

The error persists after appending the :rw to volume image

image

pierrejo commented 2 months ago

@edersilva78 & @pierrejo If you're able to check, what are the permissions on your uploads directory? This could be related to #2694

Thanks for your reply.

Despite changing file and folder permissions, nothing changes on my end (I also tried: chmod -R 777)

First level :

# ls -lah
total 24K
drwxrwxrwx 6 1001 65533 4.0K Jun 14 10:08 .
drwxr-xr-x 4 root root  4.0K Jun 20 10:32 ..
drwxrwxrwx 4 1001 65533 4.0K Jun 19 17:08 clsdczg4p000a96n39jm7tkvv
drwxrwxrwx 4 root root  4.0K Jun 14 10:05 clsddl3dr000q96n3pc8evhlz
drwxrwxrwx 3 root root  4.0K Jun 14 10:05 clsehy16q000a4e1dr3j7n5e6
drwxrwxrwx 3 root root  4.0K Jun 14 10:05 clte8esph0003hx7dlsq2ukqg

Second Level :

clsdczg4p000a96n39jm7tkvv# ls -lah
total 16K
drwxrwxrwx 4 1001 65533 4.0K Jun 19 17:08 .
drwxrwxrwx 6 1001 65533 4.0K Jun 14 10:08 ..
drwxrwxrwx 2 1001 65533 4.0K Jun 20 10:24 private
drwxrwxrwx 2 1001 65533 4.0K Jun 19 17:16 public

Third level is 777 too.

edersilva78 commented 1 month ago

Hi! @pierrejo

I managed to fix the issue by updating the database records manually.

update "Product" set logo = '{}'::jsonb;

update "User" set imageURL = NULL

jobenjada commented 1 week ago

@Dhruwang whats the status here? Pls follow up or update the ticket status

edersilva78 commented 4 days ago

it's working for me now. my problems was related to a (missing/not applied) migration

mattinannt commented 2 days ago

@pierrejo Are you still facing this issue with the latest version?