Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Перестал работать full-запуск #17

Open
azart opened this issue Jul 19, 2024 · 5 comments
Open

Перестал работать full-запуск #17

azart opened this issue Jul 19, 2024 · 5 comments

Comments

@azart
Copy link

azart commented Jul 19, 2024

Вероятно, после последнего большого обновления Figma, сломался скрипт.
В логах выдается такое, комменты из предыдущих тикетов не помогают:

2024-07-19 10:45:21 Opening the login page
2024-07-19 10:45:55 Filling the email field
2024-07-19 10:45:55 Filling the password field
2024-07-19 10:45:56 Clicking the submit button
2024-07-19 10:45:56 Waiting for an after-login page opening
2024-07-19 10:46:16 Starting to process file, url: https://www.figma.com/file/mLPYMNSRT6wa5VtXwjWoZa1l2rL/
TimeoutError: Waiting for selector `[data-testid="set-tool-default"]` failed: Waiting failed: 60000ms exceeded
    at new WaitTask (/Users/aleksandr/Desktop/figma-backup/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:50:34)
    at IsolatedWorld.waitForFunction (/Users/aleksandr/Desktop/figma-backup/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Realm.js:25:26)
    at CSSQueryHandler.waitFor (/Users/aleksandr/Desktop/figma-backup/node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js:172:95)
    at async CdpFrame.waitForSelector (/Users/aleksandr/Desktop/figma-backup/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:522:21)
    at async CdpPage.waitForSelector (/Users/aleksandr/Desktop/figma-backup/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:1305:20)
    at async downloadFile (/Users/aleksandr/Desktop/figma-backup/figma_actions.js:139:9)
    at async /Users/aleksandr/Desktop/figma-backup/figma_download_files_by_list.js:48:26
download (1/258) mLPYMNS5VtXwjWoZa1l2rL, Icons result: -7
@mkartsev86
Copy link

Аналогичная проблема

@Nikich1308
Copy link

@azart @mkartsev86 Попробуйте это

В файле figma_actions.js строка 139 (https://github.com/ritds/figma_backup/blob/master/figma_actions.js#L139) заменяем название элемента set-tool-default на любой другой существующий на странице. Например, на кнопку Share multiplayer-toolbar-share-button.

Было
await page.waitForSelector('[data-testid="set-tool-default"]', {timeout: settings.pageLoadTimeout});

Стало
await page.waitForSelector('[data-testid="multiplayer-toolbar-share-button"]', {timeout: settings.pageLoadTimeout});

@azart
Copy link
Author

azart commented Aug 12, 2024

@Nikich1308 спасибо, попробовал.
Но скачивание все-равно не идет.

Теперь ошибка такая:

2024-08-12 18:06:57 Opening the login page
2024-08-12 18:07:31 Filling the email field
2024-08-12 18:07:31 Filling the password field
2024-08-12 18:07:31 Clicking the submit button
2024-08-12 18:07:31 Waiting for an after-login page opening
2024-08-12 18:09:11 Starting to process file, url: https://www.figma.com/file/mLPYMNSRT6wa5VtXwjWoZa1l2rL/
2024-08-12 18:11:02 Tmp directory to save the file: ./process/_downloads/tmp1/
TypeError: page._client.send is not a function
    at downloadFile (/Users/aleksandr/Desktop/figma-backup/figma_actions.js:179:28)
    at async /Users/aleksandr/Desktop/figma-backup/figma_download_files_by_list.js:48:26
download (1/259) mLPYMNS5VtXwjWoZa1l2rL, Icons result: -7

@Misinin
Copy link

Misinin commented Aug 15, 2024

@azart @mkartsev86
на 189ой строчке /figma_actions.js нужно заменить div на button и все будет работать|

...
 const mainMenu = document.querySelector('button[data-tooltip="main-menu"]');
 ....

@azart
Copy link
Author

azart commented Aug 16, 2024

@Misinin спасибо, заработало (с учетом правок от @Nikich1308 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants