Strange endless reloading on EASDK

Hey Shopify and App devs,

 

Today I've had a report of some strange behaviour on a particular user of my app, Order Printer Pro, which I'm able to reprodice. When we load up the app through their Shopify account, the page automatically reloads each time the ShopifyApp is initialized in the EASDK. This causes an endless loop. The page loads and as soon as EASDK is initialised, it triggers the reload. This happens on any page where the EASDK is being loaded.

 

I'm inspecting the network request to see where it's being triggered, and it seems to be coming from Shopify's core.js file, and when inspecting the response, this is logged in javascript (notice the "access denied" error at the end):

 

{data: {,…}, errors: [{message: "access denied", locations: [{line: 54, column: 5}],…}],…}
data: {,…}
appByHandle: {apiKey: "xxxx", betaAdditionalUserData: false, betaEASDKv1OptOut: false,…}
apiKey: "xxxx"
betaAdditionalUserData: false
betaEASDKv1OptOut: false
betaEmbeddedAppWebUSB: false
betaFeatureFullScreen: false
developerName: "FORSBERG+two"
handle: "order-printer-emailer"
icon: {id: null,…}
id: "gid://shopify/App/xxxx"
installation: {id: "gid://shopify/AppInstallation/xxxx",…}
title: "Order Printer Pro"
__typename: "App"
appByKey: null
shop: {id: "gid://shopify/Shop/xxxx", easdk: false, __typename: "Shop"}
easdk: false
id: "gid://shopify/Shop/xxxx"
__typename: "Shop"
staffMember: {id: "gid://shopify/StaffMember/xxxx", accountAccess: "Limited access", name: "FORSBERG+two",…}
accountAccess: "Limited access"
email: "bjorn@forsbergplustwo.com"
id: "gid://shopify/StaffMember/36279255149"
locale: "en"
name: "FORSBERG+two"
__typename: "StaffMember"
errors: [{message: "access denied", locations: [{line: 54, column: 5}],…}]
0: {message: "access denied", locations: [{line: 54, column: 5}],…}
extensions: {cost: {requestedQueryCost: 16, actualQueryCost: 10,…}}
cost: {requestedQueryCost: 16, actualQueryCost: 10,…}

 

Any ideas why this is, or is anyone seeing something similar? I'm thinking it's perhaps a beta of EASDK being rolled out, but not sure.

 

Thanks,

Bjorn

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes
New Member
3 0 0

Hello Bjorn,

 

I have the same problem with our app for staff member with limited shop access. The problem occured first time round about three or four days ago. The network request is the same with an 'access denied' error on line 54. Do you find a solution for this problem?

 

Best regards,
Andreas

0 Likes

Hey Andreas,

 

I haven't found a way around it yet, guessing this something only Shopify can fix. Will see if I can get some Shopify Dev eyes on it :)

Thanks,

Bjorn

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes
Community Manager
Community Manager
323 16 73

Hi @Bjorn_Forsberg_ ,

 

We're looking into it! Will try to update as soon as I know more.

 

Cheers

Developer Experience @ Shopify
0 Likes
Tourist
5 1 0
Hi Rayn Just wondering you guys found anything yet?
0 Likes
New Member
3 0 0

I got following answer and changed the permissions of the staff member. In our case it was the products permission. The strange redirects gone away.

 

If a staff member does not have the same permissions as an app accesses, then using the app wouldn't be possible for them. Since the app accesses the stores products, staff who do not have the required permissions to view products won't be able to access the app.

For staff members to be able to access the app, they would either need the appropriate permissions, or the app would need to be edited to not include those permissions. So in this case, the app would need to not be accessing products for staff members without the products permissions to be able to use the app.

0 Likes
Tourist
5 1 0

Hi Andreas

 

Thanks for the information, in a way it does seems to make sense

 

I'll try it!

0 Likes

Hey Ryan,

 

Any updates on this mate? It's been weeks now, and no user with limited permissions can use our apps :(

 

Many thanks,

Bjorn

Bjorn Forsberg | FORSBERG+two | Award-winning Shopify Apps since 2011
0 Likes
Community Manager
Community Manager
323 16 73

Hey Bjorn, I'll double check with the team.  Last update I had was that they were working with affected parties on getting a fix.

Developer Experience @ Shopify
0 Likes
Community Manager
Community Manager
323 16 73

So it looks like the cause is that the user doesn't have permissions for products, and a workaround could be to have that merchant account be granted product permissions.  The team is still exploring other options though.

Developer Experience @ Shopify
0 Likes