pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.66k stars 279 forks source link

[BUG] undefined icon #4578

Closed NVD-R closed 7 months ago

NVD-R commented 8 months ago

What happened?

The site I was testing is: https://pollint.com/ Error: Failed to download icon https://pollint.com/undefined. Responded with status 500 at ImageHelper.fetchIcon (/app/node_modules/@bubblewrap/core/dist/lib/ImageHelper.js:96:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async TwaGenerator.generateIcons (/app/node_modules/@bubblewrap/core/dist/lib/TwaGenerator.js:210:22) at async Promise.all (index 1) at async TwaGenerator.generateShortcuts (/app/node_modules/@bubblewrap/core/dist/lib/TwaGenerator.js:242:9) at async TwaGenerator.createTwaProject (/app/node_modules/@bubblewrap/core/dist/lib/TwaGenerator.js:335:9) at async BubbleWrapper.generateTwaProject (file:///app/build/bubbleWrapper.js:89:9) at async BubbleWrapper.generateAppPackage (file:///app/build/bubbleWrapper.js:38:9) at async createAppPackageWith403Fallback (file:///app/routes/project.js:260:16) at async createAppPackage (file:///app/routes/project.js:236:16)

How do we reproduce the behavior?

i load my url and android package generator return an undefined word end of my address. so cant download it coz never exists any undefined

What do you expect to happen?

No response

What environment were you using?

i use pwa builder web site

Additional context

No response

Jaylyn-Barbee commented 8 months ago

I believe this is occurring because in your second shortcut you put an empty list for the icons entry,

"shortcuts": [
       ...,
    {
      "name": "Shortcut Link 2",
      "description": "Shortcut Link 2 Description",
      "url": "/shortcutlink2",
      "icons": [
        []
      ]
    }
]

and its looking for an icon there but can't find it. To fix this, you can just completely remove the icon field since its not required for each shortcut. There are also some other warnings in edge dev tools:

image

Try fixing those warnings, packaging again and you should be good to go.

microsoft-github-policy-service[bot] commented 8 months ago

This issue has been automatically marked as "no-recent-activity" because it requires author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been automatically closed because it was marked as requiring author feedback but has not had any activity for 7 days.