marketingEvents GraphQL is returning "Internal Error"

921Kiyo
Shopify Partner
15 0 1

I am developing a shopify app using remix.js (with permission read_marketing_events). With the following simple query code, I am getting "Internal error. Looks like something went wrong on our end.", which suggests that something is wrong on Shopify side. 

 

```

const marketingActivitiesQuery = `#graphql
query {
marketingEvents(first: 5) {
edges {
node {
id
}
}
}
}`;
const marketingResponse = await admin.graphql(marketingActivitiesQuery);

````

 

Here is the full error log

```
11:14:34 │ remix │ An error occurred: GraphqlQueryError: Internal error. Looks like something went wrong on our end.
11:14:34 │ remix │ Request ID: f2468459-ffda-4807-ae06-10dd9cc6b150 (include this in support requests).
11:14:34 │ remix │ at NewGraphqlClient.<anonymous> (/Users/kiyohitokunii/Desktop/repeatclub/node_modules/@shopify/shopify-api/lib/clients/graphql/graphql_client.ts:87:13)
11:14:34 │ remix │ at Generator.next (<anonymous>)
11:14:34 │ remix │ at fulfilled (/Users/kiyohitokunii/Desktop/repeatclub/node_modules/tslib/tslib.js:166:62)
11:14:34 │ remix │ at processTicksAndRejections (node:internal/process/task_queues:95:5) {
11:14:34 │ remix │ response: { errors: [ [Object] ] },
11:14:34 │ remix │ headers: {
11:14:34 │ remix │ 'Alt-Svc': [ 'h3=":443"; ma=86400' ],
11:14:34 │ remix │ 'Cf-Cache-Status': [ 'DYNAMIC' ],
11:14:34 │ remix │ 'Cf-Ray': [ '852bb084b8da48b9-LHR' ],
11:14:34 │ remix │ Connection: [ 'close' ],
11:14:34 │ remix │ 'Content-Encoding': [ 'br' ],
11:14:34 │ remix │ 'Content-Language': [ 'en' ],
11:14:34 │ remix │ 'Content-Security-Policy': [
11:14:34 │ remix │ "default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src
'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com
https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com
https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri
/csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=f2468459-ffda-4807-ae06-10dd9cc6b150"
11:14:34 │ remix │ ],
11:14:34 │ remix │ 'Content-Type': [ 'application/json; charset=utf-8' ],
11:14:34 │ remix │ Date: [ 'Fri, 09 Feb 2024 11:14:34 GMT' ],
11:14:34 │ remix │ Nel: [
11:14:34 │ remix │ '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
11:14:34 │ remix │ ],
11:14:34 │ remix │ 'Referrer-Policy': [ 'origin-when-cross-origin' ],
11:14:34 │ remix │ 'Report-To': [
11:14:34 │ remix │ '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=7z3FxAZGG3ZZxBZdQbNMOKcm4gMIoczLwb1MTrSW74gVMEbqfvO6rVJaIodIJnL25CA26llzgUnrpobUeFUJeXK%2BsoQukp4X9DTkP
scwKMnO83l0PXfjZSWqyd2gF3G74BHL5qr3BAKN0MujlyUgT06HKg%3D%3D"}],"group":"cf-nel","max_age":604800}'
11:14:34 │ remix │ ],
11:14:34 │ remix │ Server: [ 'cloudflare' ],
11:14:34 │ remix │ 'Server-Timing': [
11:14:34 │ remix │ 'processing;dur=199, graphql;desc="admin/query/other", cfRequestDuration;dur=345.999956'
11:14:34 │ remix │ ],
11:14:34 │ remix │ 'Strict-Transport-Security': [ 'max-age=7889238' ],
11:14:34 │ remix │ 'Transfer-Encoding': [ 'chunked' ],
11:14:34 │ remix │ Vary: [ 'Accept-Encoding' ],
11:14:34 │ remix │ 'X-Content-Type-Options': [ 'nosniff' ],
11:14:34 │ remix │ 'X-Dc': [ 'gcp-europe-west2,gcp-us-east1' ],
11:14:34 │ remix │ 'X-Download-Options': [ 'noopen' ],
11:14:34 │ remix │ 'X-Envoy-Upstream-Service-Time': [ '201' ],
11:14:34 │ remix │ 'X-Frame-Options': [ 'DENY' ],
11:14:34 │ remix │ 'X-Permitted-Cross-Domain-Policies': [ 'none' ],
11:14:34 │ remix │ 'X-Request-Id': [ 'f2468459-ffda-4807-ae06-10dd9cc6b150' ],
11:14:34 │ remix │ 'X-Shardid': [ '87' ],
11:14:34 │ remix │ 'X-Shopid': [ '56773935192' ],
11:14:34 │ remix │ 'X-Shopify-Api-Version': [ '2023-10' ],
11:14:34 │ remix │ 'X-Shopify-Stage': [ 'production' ],
11:14:34 │ remix │ 'X-Sorting-Hat-Podid': [ '87' ],
11:14:34 │ remix │ 'X-Sorting-Hat-Shopid': [ '56773935192' ],
11:14:34 │ remix │ 'X-Stats-Apiclientid': [ '86084780033' ],
11:14:34 │ remix │ 'X-Stats-Apipermissionid': [ '390095339608' ],
11:14:34 │ remix │ 'X-Stats-Userid': [ '' ],
11:14:34 │ remix │ 'X-Xss-Protection': [
11:14:34 │ remix │ '1; mode=block;
report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=f2468459-ffda-4807-ae06-10dd9cc6b150'
11:14:34 │ remix │ ]
11:14:34 │ remix │ }
11:14:34 │ remix │ }
```

 

API version is 2024-01, but is there a known issue for this endpoint?

Replies 3 (3)

wil_dev
Shopify Partner
12 0 1

Hi
Try edges(first: 5) ?

921Kiyo
Shopify Partner
15 0 1

Thanks for the reply. But it's saying "An error occurred: GraphqlQueryError: Field 'edges' doesn't accept argument 'first'"

wil_dev
Shopify Partner
12 0 1

I think you need to sent a ticket to the shopify support, when I try, I'm having the same problem:

 

"Internal error. Looks like something went wrong on our end.\nRequest ID: 83bf4c70-7516-48fd-b99c-86acc9ae1552 (include this in support requests)."

Good luck!