SGFGOV / medusa-plugin-shopify-ts

Typescirpt version of the popular shopify importer plugin
MIT License
1 stars 1 forks source link

Unable to import from api route #3

Open felipemullen opened 1 year ago

felipemullen commented 1 year ago

I have been unable to use the built in api routes as described in #2 so I decided to copy the logic from the save-shopify-products source and test it in my own route.

This is the import error I received

::1 - - [27/May/2023:19:02:49 +0000] "GET /hello HTTP/1.1" 200 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
info:    fetching page products 0
API Deprecation Notice: {
  message: 'https://shopify.dev/changelog/contextual-pricing-for-products-is-now-available-in-the-graphql-admin-api',
  path: 'https://itslelo.myshopify.com/admin/api/unstable/products.json'
}
info:    batch_01H1F9F3HDTY45Q630V6V3X8SV  import in progress - products batch created 
info:    completed fetching 1
info:    fetching page collects 0
info:    completed fetching 1
info:    fetching page custom_collections 0
info:    completed fetching 1
info:    fetching page smart_collections 0
info:    batch_01H1F9F628W6JBHAWKHGGQMMNM  import in progress - smart_collections batch created 
info:    completed fetching 1
info:    Processing batch.created which has 2 subscribers
info:    Evaluating shopify-import batch_01H1F9F3HDTY45Q630V6V3X8SV requested by usr_01H17ZGCB5MMCG8GZABB6TGCQ1 created
info:    Pre processed shopify data  job id: batch_01H1F9F3HDTY45Q630V6V3X8SV
info:    Shopfy Jobs Summary: Total Jobs: 8
    created: 1
    confirmed: 0
    processing: 0
    completed: 0,
    failed: 7 
info:    Processing batch.pre_processed which has 1 subscribers
info:    Evaluating shopify-import batch_01H1F9F3HDTY45Q630V6V3X8SV requested by usr_01H17ZGCB5MMCG8GZABB6TGCQ1 pre_processed
info:    Shopfy Jobs Summary: Total Jobs: 8
    created: 0
    confirmed: 0
    processing: 0
    completed: 0,
    failed: 8 

I am almost certain my configuration is correct, but I am not sure yet what is breaking

SGFGOV commented 1 year ago

Hi.. It looks like your batch processing is failing...can you share the failed job logs from the server? It's in the dB under batched jobs

On Sun, 28 May, 2023, 02:18 Felipe Mullen, @.***> wrote:

I have been unable to use the built in api routes as described in #2 https://github.com/SGFGOV/medusa-plugin-shopify-ts/issues/2 so I decided to copy the logic from the save-shopify-products source https://github.com/SGFGOV/medusa-plugin-shopify-ts/blob/master/src/api/admin/shopify-admin-handler.ts#L15-L59 and test it in my own route.

This is the import error I received

::1 - - [27/May/2023:19:02:49 +0000] "GET /hello HTTP/1.1" 200 2 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" info: fetching page products 0 API Deprecation Notice: { message: 'https://shopify.dev/changelog/contextual-pricing-for-products-is-now-available-in-the-graphql-admin-api', path: 'https://itslelo.myshopify.com/admin/api/unstable/products.json' } info: batch_01H1F9F3HDTY45Q630V6V3X8SV import in progress - products batch created info: completed fetching 1 info: fetching page collects 0 info: completed fetching 1 info: fetching page custom_collections 0 info: completed fetching 1 info: fetching page smart_collections 0 info: batch_01H1F9F628W6JBHAWKHGGQMMNM import in progress - smart_collections batch created info: completed fetching 1 info: Processing batch.created which has 2 subscribers info: Evaluating shopify-import batch_01H1F9F3HDTY45Q630V6V3X8SV requested by usr_01H17ZGCB5MMCG8GZABB6TGCQ1 created info: Pre processed shopify data job id: batch_01H1F9F3HDTY45Q630V6V3X8SV info: Shopfy Jobs Summary: Total Jobs: 8 created: 1 confirmed: 0 processing: 0 completed: 0, failed: 7 info: Processing batch.pre_processed which has 1 subscribers info: Evaluating shopify-import batch_01H1F9F3HDTY45Q630V6V3X8SV requested by usr_01H17ZGCB5MMCG8GZABB6TGCQ1 pre_processed info: Shopfy Jobs Summary: Total Jobs: 8 created: 0 confirmed: 0 processing: 0 completed: 0, failed: 8

I am almost certain my configuration is correct, but I am not sure yet what is breaking

— Reply to this email directly, view it on GitHub https://github.com/SGFGOV/medusa-plugin-shopify-ts/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXEQJHEHZTD6IBM26LEOXWTXIJSBLANCNFSM6AAAAAAYRMMDZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.   

felipemullen commented 1 year ago

I see a few rows in batch_job. They all contain an error result that looks like this:

{
  "errors": [
    "Unable to find a BatchJob strategy with the type shopify-import"
  ]
}
SGFGOV commented 8 months ago

Sorry i've not had the time to debug this. can you please share your configuration. Have you specified shopname ?