ActiveCampaign / postmark-cli

The official CLI tool for Postmark
https://postmarkapp.com
MIT License
79 stars 9 forks source link

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null #48

Closed khankid closed 1 year ago

khankid commented 3 years ago

Running postmark templates pull ., inputting credentials, gives me:

Getting a TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null after some Template named "foobar" will not be downloaded because it is missing an alias.

Templates do get saved, so this is non critical issue - but it would interfere when I'd need to setup CI.

khankid commented 1 year ago

don't respond all at once you guys 😅😛

andryan commented 1 year ago

andryan@instance-1:~/postmark$ postmark templates pull . ? Please enter your server token •••••••••••••••••••••••••••••••••••• ? Overwrite the files in .? Yes TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null All finished! 10 templates have been saved to ..

This issue is still there. No plan to fix/address?

derekrushforth commented 1 year ago

Hey folks, so sorry about the delayed response here. Does the template that's producing the error have an alias? The CLI tool requires that each template has an alias before pushing/pulling. Here's how to set one in Postmark's UI - https://postmarkapp.com/support/article/1117-how-do-i-use-a-template-alias.

If you're still seeing the error after setting the alias, can you submit a support ticket containing your account and server that you're using when running the command? I'll see if we can get this fixed. My hunch is that it might be something related to the content inside the template.

andryan commented 1 year ago

Hey folks, so sorry about the delayed response here. Does the template that's producing the error have an alias? The CLI tool requires that each template has an alias before pushing/pulling. Here's how to set one in Postmark's UI - https://postmarkapp.com/support/article/1117-how-do-i-use-a-template-alias.

If you're still seeing the error after setting the alias, can you submit a support ticket containing your account and server that you're using when running the command? I'll see if we can get this fixed. My hunch is that it might be something related to the content inside the template.

Hi @derekrushforth, thanks for replying. I can confirm that every template we have has an alias configured already. I will open a support ticket as you suggested. Cheers!

derekrushforth commented 1 year ago

Thanks for providing more info @andryan. I tracked down the issue and released a new version(1.6.16) with the fix. Let me know if you run into any more issues.

andryan commented 1 year ago

hi @derekrushforth thank you so much for fixing the problem! I can confirm now that the issue no longer exists on version 1.6.16.

really appreciate the prompt response and quality resolution