Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
82 stars 9 forks source link

NavigationMenu Permissions #221

Open zhou0219 opened 12 months ago

zhou0219 commented 12 months ago

When I use NavigationMenu,

            <NavigationMenu
              navigationLinks={[
                {
                  label: t("NavigationMenu.pageName"),
                  destination: "/pagename",
                },
              ]}
            />

it appears

AppBridgeError2 {name: 'AppBridgeError', message: 'APP::ERROR::PERMISSION', action: {…}, type: 'APP::ERROR::PERMISSION', stack: 'AppBridgeError: APP::ERROR::PERMISSION'}
action : {type: 'APP::ERROR::PERMISSION', group: 'Error', payload: {…}}
message : "APP::ERROR::PERMISSION"
name : "AppBridgeError"
type : "APP::ERROR::PERMISSION"
stack: "AppBridgeError: APP::ERROR::PERMISSION"
[[Prototype]] : Error

I want to know what permissions should be added to solve this problem

MitchLillie commented 11 months ago

👋 Hi @zhou0219 !

Can you share some more information about the problem you're experiencing?

Specifically:

henrytao-me commented 11 months ago

Is your app a channel?

weirdian2k3 commented 11 months ago

@MitchLillie @henrytao-me I converted my app to a channel last week and started getting this error. I wasn't getting it before

TreeOfLearning commented 9 months ago

Any updates on this? We are seeing this behaviour on version 3.7.9

henrytao-me commented 9 months ago

NavigationMenu component doesn't work with sale channels right now. To unblock you, I would suggest the following:

TreeOfLearning commented 9 months ago

NavigationMenu component doesn't work with sale channels right now. To unblock you, I would suggest the following:

We managed to fix our issue. For what it's worth, though, unless we're missing something your second option is a non-starter for anyone using next.js and typescript. It's not actually possible to use the custom element because it is not a valid jsx element due to being lowercase. If you ignore the compiler warnings and add it to next's Head component, it moves the component to the body tag as it is not a valid jsx component.

spam0115 commented 5 months ago

That does not work. It just creates plain links and not React links that use the router.