zapier / zapier-platform

The SDK for you to build an integration on Zapier

Home Page:https://platform.zapier.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: CLI zapier push results in EBUSY

masewo opened this issue · comments

Bug Description

When trying to execute zapier push I get the following error:

zapier push --debug
  zapier:push argv is [ '--debug' ] +0ms
  zapier:push args are {} +2ms
  zapier:push flags are { debug: true } +0ms
  zapier:push ------------ +1ms
  zapier:analytics sending {
  command: 'push',
  isValidCommand: true,
  numArgs: 0,
  flags: { debug: true },
  cliVersion: '15.5.3',
  os: 'win32',
  sendUserId: true
} +0ms
  zapier:api >> GET https://zapier.com/api/platform/cli/apps/xxx +0ms
  zapier:api << 200 +1ms
  zapier:api << {"id": xxx, "public": false, "pending": false, "public_ish": false, "status": "private", "date": "2024-03-24T12:41:06+00:00", "last_changed": "2024-03-24T12:41:06+00:00", "title": "xxx", "description": "xxx", "image": null, "key": "Appxxx", "invite_url": "https://zapier.com/developer/public-invite/xxx/xxx/", "intention": "global", "homepage_url": "https://xxx.de", "app_category": "ads-conversion
", "app_category_other": "", "role": "employee", "slug": null, "allowed_self_signup_domains": "xxx.de", "self_signup_allowed": true, "latest_version": "", "latest_core_version": "", "all_versions": [], "versions": [], "core_versions": [],
 "service_id": null, "is_beta": false, "submit_status": null, "is_new_app_migration_endpoints": true} +0ms
  zapier:api ------------ +0ms
  zapier:build Using temp directory:  C:\Users\marcu\AppData\Local\Temp\zapier-02d2a0ed +0ms
- Copying project to temp directory  zapier:api >> POST https://zapier.com/api/platform/cli/analytics +13ms
  zapier:api >> {"command":"push","isValidCommand":true,"numArgs":0,"flags":{"debug":true},"cliVersion":"15.5.3","os":"win32"} +0ms
  zapier:api << 200 +1ms
  zapier:api << {"success": true} +0ms
  zapier:api ------------ +0ms
  zapier:analytics success: true +307ms
× Copying project to temp directory
  zapier:push Error: EBUSY: resource busy or locked, read +331ms
 »   Error: EBUSY: resource busy or locked, read

Reproduction Steps

  1. Create example application typescript
  2. npm i
  3. Add session auth
  4. Add an create
  5. zapier register
  6. zapier push

Zapier Platform version

  • CLI version: 15.5.3 * Node.js version: v20.9.0 * OS info: win32-x64 * zapier-platform-core dependency: 15.5.3

Node.js version

v20.9.0

Your Operating System

Windows 10.0.19045.0

npm/yarn version

10.5.0

App ID

201853

More Details

Tried to deactivate Anti Virus Scanner. Tried to restart computer. Tried npm cache clean --force, npm i -g zapier-platform-cli and npm cache verify. Nothing helped.

@masewo it looks like your system temporary directory can't be accessed for some reason. After installing dependencies, can you try zapier push --skip-npm-install? The --skip-npm-install option tells the command to pack the the code using node_modules in the working directory rather than using a temporary directory.

@eliangcs The same error. Seems like he trys to access the temp directory anyway.

zapier push --skip-npm-install --debug
  zapier:push argv is [ '--skip-npm-install', '--debug' ] +0ms
  zapier:push args are {} +2ms                                        
  zapier:push flags are { 'skip-npm-install': true, debug: true } +1ms
  zapier:push ------------ +0ms                                       
  zapier:analytics sending {                                          
  command: 'push',                                                    
  isValidCommand: true,
  numArgs: 0,
  flags: { 'skip-npm-install': true, debug: true },
  cliVersion: '15.5.3',
  os: 'win32',
  sendUserId: true
} +0ms
  zapier:api >> GET https://zapier.com/api/platform/cli/apps/xxx +0ms
  zapier:api << 200 +1ms
  zapier:api << {"id": xxx, "public": false, "pending": false, "public_ish": false, "status": "private", "date": "2024-03-24T12:41:06+00:00", "last_changed": "2024-03-24T13:41:08+00:00", "title": "xxx", "description": "xxx", "image": "https://cdn.zapier.com/storage/developer_cli/xxx.png", "key": "Appxxx", "invite_url": "https://zapier.com/dev
eloper/public-invite/xxx/xxx/", "intention": "global", "homepage_url": "https://xxx.de", "app_category": "ads-conversion", "app_category_other": "", "role": "employee", "slug": null, "allowed_self_signup_do
mains": "xxx.de", "self_signup_allowed": true, "latest_version": "1.0.0", "latest_core_version": "15.5.3", "latest_core_npm_version": "15.5.3", "all_versions": ["1.0.0"], "versions": ["1.0.0"], "core_versions": ["15.5.3"], "service_id": n
ull, "is_beta": false, "submit_status": null, "is_new_app_migration_endpoints": true} +0ms
  zapier:api ------------ +0ms
  zapier:build Using temp directory:  C:\Users\marcu\AppData\Local\Temp\zapier-173187fe +0ms
- Copying project to temp directory  zapier:api >> POST https://zapier.com/api/platform/cli/analytics +373ms
  zapier:api >> {"command":"push","isValidCommand":true,"numArgs":0,"flags":{"skip-npm-install":true,"debug":true},"cliVersion":"15.5.3","os":"win32"} +1ms
  zapier:api << 200 +0ms
  zapier:api << {"success": true} +0ms
  zapier:api ------------ +0ms
  zapier:analytics success: true +834ms
× Copying project to temp directory
  zapier:push Error: EBUSY: resource busy or locked, read +2s
 »   Error: EBUSY: resource busy or locked, read

@masewo sorry, my bad. --skip-npm-install doesn't avoid accessing the temp directory; it only avoids running npm install.

Maybe you'd like to use a tool like Resource Monitor to see what's locking your system's temporary directory, as described in this StackOverflow post?

@eliangcs
Yes, I already tried the Resource Monitor approach but didn't find any open handle on the mentioned temp directory.

Because of your hint I tried it again and this time I also searched for open handles on the app working directory. I saw a lot of handles including some of JetBrains WebStorm. So I closed WebStorm and tried it via PowerShell and then the push worked!

I started disabling plugin by plugin in WebStorm to find out if it's one of them. And yes, it was the plugin GitHub Copilot.

I double checked by enabling and disabling a lot of plugin combinations followed by some restarts. I guess it has to be the fault of the GitHub Copilot plugin.

Closing the issue.