Troubleshooting native apps

I get the "Cannot read property 'store_id' of null" error

This error happens when Ecwid JS SDK can't find the payload data and use it in your code. Most likely you are opening the native page directly via URL. Make sure to open your app within the Ecwid Control Panel, where the payload query param from Ecwid is provided.

"Something went wrong" error

You created an app and installed it on your test store. The new tab appears in your Control Panel. But the new tab content is not loaded and displaying the "Something went wrong" error message instead? Possible reasons:

The application in the tab is not initialized

To display your app, it must first be initialized via Ecwid JS SDK with a correct namespace.

How to check

Make sure you initialize the app in your code with the proper namespace using the .init() method of Ecwid JS SDK.

The iframe URL performs a redirect

When loading an application in Control Panel, Ecwid checks for the iframe page to have the same address as specified in the application.

How to check

Open Development tools in your browser. Find your iframe URL in the Ecwid Control Panel DOM. Open that URL to check if it does any redirects when opened. Make sure that your page initializes the app via JS SDK before making a redirect.

Browser cannot reach the iframe URL

Your URL is unavailable or because it has restricted access.

How to check

Open Development tools in your browser. Find your iframe URL in the Ecwid Control Panel DOM. Open that URL to check if it opens for you successfully.

Browser blocks the document in iframe

The page loads content over HTTP while the Control Panel is working over HTTPS only - (the "mixed content" issue).

How to check

When this happens, you should see a browser prompt at the top about some content being blocked on a page. To fix this, you can either explicitly allow it to load, or provide Ecwid team with a HTTPS iframe URL for your app.

Ecwid Control Panel is blocked from loading your app in iframe

Your app server responds with the "SAMEORIGIN" value in X-Frame-Options header.

How to check

This usually is recorded in the browser's console in Developer tools. You can also open your iframe URL directly and check the headers it sends.

App tab does not appear

You created an app and installed it on your test store, but the new tab does not appear when you open your store. There are several possible reasons:

The application is misconfigured to be displayed inside Control Panel

How to check

See "Set up your application" and make sure you've provided those details to the Ecwid team.

The app doesn't have the necessary access scope

Make sure your app includes the "add_to_cp" scope in the list of requested permissions.

How to check

Go to Ecwid Control Panel -> Apps -> My apps and check the permissions of your app provided by the store. If it misses the 'Embed a page into the control panel' permission, contact Ecwid team to add it.

You're testing it in an Ecwid store which is on Free plan

Ecwid API functionality including embedding apps is available on paid Ecwid plans only. Please upgrade your account.

How to check

Go to Ecwid Control Panel -> My Profile -> Billing and Plans and check your current plan status. If you need a store only for testing and development purposes, Ecwid can provide a free upgrade for you. Contact Ecwid team with Store ID and app details to get it.