geeklearningio / gl-vsts-tasks-ghost

Bring some devops process to Ghost Pro with VSTS
MIT License
3 stars 0 forks source link

Theme upload fails due to new UI #13

Closed jessehouwing closed 5 years ago

jessehouwing commented 5 years ago

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

Description

The new UI inlines the blog itself and moves a couple of items around.

3_login done 4_theme page

Uploading the theme results in a 404.

Expected behavior

Theme is uploaded correctly.

Reproduction

Insert reproduction steps here

##[debug]Evaluating condition for step: 'Ghost '
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Ghost
==============================================================================
Task : Ghost theme uploader
Description : Upload a theme to a Ghost blog.
Version : 1.0.1003
Author : Geek Learning
Help : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-ghost/wiki/Ghost) (Version 1.0.1003).
Dear Angular and Ember CLI users, please check our [known issues](https://github.com/geeklearningio/gl-vsts-tasks-ghost/wiki/Known-Issues)
==============================================================================
##[debug]agent.workFolder=C:\AzureDevOps-Agents\jessehouwing\_work
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_fb2da09f-1984-453f-8ec5-5269c96bc969
##[debug]loading ENDPOINT_AUTH_PARAMETER_fb2da09f-1984-453f-8ec5-5269c96bc969_PASSWORD
##[debug]loading ENDPOINT_AUTH_PARAMETER_fb2da09f-1984-453f-8ec5-5269c96bc969_USERNAME
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_fb2da09f-1984-453f-8ec5-5269c96bc969
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading INPUT_BLOG
##[debug]loading INPUT_SCREENSHOTPATH
##[debug]loading INPUT_TAKESCREENSHOTS
##[debug]loading INPUT_THEME
##[debug]loading INPUT_UPLOADTIMEOUT
##[debug]loaded 12
##[debug]theme=C:\AzureDevOps-Agents\jessehouwing\_work\6\s\dist\casper-jessehouwingnl.zip
##[debug]takeScreenshots=true
##[debug]screenshotPath=C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots
##[debug]blog=fb2da09f-1984-453f-8ec5-5269c96bc969
##[debug]fb2da09f-1984-453f-8ec5-5269c96bc969=https://scrumbug.ghost.io/
fb2da09f-1984-453f-8ec5-5269c96bc969 exists true
##[debug]fb2da09f-1984-453f-8ec5-5269c96bc969 exists true
##[debug]CHROMIUM_BIN=c:\program files (x86)\google\chrome\Application\chrome.exe
##[debug]uploadTimeout=120
Opening blog: https://scrumbug.ghost.io/
Logging in with ***
Logged in with ***
Navigating to the design section
##[debug]Error: waiting for selector "a.gh-themes-uploadbtn" failed: timeout 30000ms exceeded
##[debug]Error: waiting for selector "a.gh-themes-uploadbtn" failed: timeout 30000ms exceeded
at Timeout.WaitTask._timeoutTimer.setTimeout (C:\AzureDevOps-Agents\jessehouwing\_work\_tasks\Ghost_7ffedbc4-ff2a-4b3c-8ad6-9ea1958275c9\1.0.1003\node_modules\puppeteer\node6\lib\FrameManager.js:1413:60)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
##[debug]task result: Failed
##[error]Error: waiting for selector "a.gh-themes-uploadbtn" failed: timeout 30000ms exceeded
##[debug]Processed: ##vso[task.issue type=error;]Error: waiting for selector "a.gh-themes-uploadbtn" failed: timeout 30000ms exceeded
##[debug]Processed: ##vso[task.complete result=Failed;]Error: waiting for selector "a.gh-themes-uploadbtn" failed: timeout 30000ms exceeded
##[debug]Upload artifact: C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots to server for build: 1833 at backend.
##[debug]Processed: ##vso[artifact.upload artifacttype=container;artifactname=screenshots;containerfolder=screenshots;localpath=C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots;]C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots
##[section]Async Command Start: Upload Artifact
Uploading 6 files
##[debug]File: 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots\1_login.loaded.png' took 257 milliseconds to finish upload
##[debug]Detail upload trace for file: screenshots/1_login.loaded.png
##[debug]File 'screenshots/1_login.loaded.png' will be uploaded in one chunk.
##[debug]Attempt '1' for uploading chunk '1' of file 'screenshots/1_login.loaded.png'.
##[debug]Generate new HttpRequest for uploading file 'screenshots/1_login.loaded.png', chunk '1' of '1'.
##[debug]Start uploading file 'screenshots/1_login.loaded.png' to server, chunk '1'.
##[debug]Finished upload chunk '1' of file 'screenshots/1_login.loaded.png', elapsed 257 (ms), response code 'Created'.
##[debug]File: 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots\0_login.navigated.png' took 287 milliseconds to finish upload
##[debug]Detail upload trace for file: screenshots/0_login.navigated.png
##[debug]File 'screenshots/0_login.navigated.png' will be uploaded in one chunk.
##[debug]Attempt '1' for uploading chunk '1' of file 'screenshots/0_login.navigated.png'.
##[debug]Generate new HttpRequest for uploading file 'screenshots/0_login.navigated.png', chunk '1' of '1'.
##[debug]Start uploading file 'screenshots/0_login.navigated.png' to server, chunk '1'.
##[debug]Finished upload chunk '1' of file 'screenshots/0_login.navigated.png', elapsed 286 (ms), response code 'Created'.
##[debug]File: 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots\2_login.filled.png' took 182 milliseconds to finish upload
##[debug]Detail upload trace for file: screenshots/2_login.filled.png
##[debug]File 'screenshots/2_login.filled.png' will be uploaded in one chunk.
##[debug]Attempt '1' for uploading chunk '1' of file 'screenshots/2_login.filled.png'.
##[debug]Generate new HttpRequest for uploading file 'screenshots/2_login.filled.png', chunk '1' of '1'.
##[debug]Start uploading file 'screenshots/2_login.filled.png' to server, chunk '1'.
##[debug]Finished upload chunk '1' of file 'screenshots/2_login.filled.png', elapsed 181 (ms), response code 'Created'.
##[debug]File: 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots\3_login.done.png' took 730 milliseconds to finish upload
##[debug]Detail upload trace for file: screenshots/3_login.done.png
##[debug]File 'screenshots/3_login.done.png' will be uploaded in one chunk.
##[debug]Attempt '1' for uploading chunk '1' of file 'screenshots/3_login.done.png'.
##[debug]Generate new HttpRequest for uploading file 'screenshots/3_login.done.png', chunk '1' of '1'.
##[debug]Start uploading file 'screenshots/3_login.done.png' to server, chunk '1'.
##[debug]Finished upload chunk '1' of file 'screenshots/3_login.done.png', elapsed 706 (ms), response code 'Created'.
##[debug]File: 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots\4_theme.page.png' took 595 milliseconds to finish upload
##[debug]Detail upload trace for file: screenshots/4_theme.page.png
##[debug]File 'screenshots/4_theme.page.png' will be uploaded in one chunk.
##[debug]Attempt '1' for uploading chunk '1' of file 'screenshots/4_theme.page.png'.
##[debug]Generate new HttpRequest for uploading file 'screenshots/4_theme.page.png', chunk '1' of '1'.
##[debug]Start uploading file 'screenshots/4_theme.page.png' to server, chunk '1'.
##[debug]Finished upload chunk '1' of file 'screenshots/4_theme.page.png', elapsed 594 (ms), response code 'Created'.
##[debug]File: 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots\5_failure.png' took 202 milliseconds to finish upload
##[debug]Detail upload trace for file: screenshots/5_failure.png
##[debug]File 'screenshots/5_failure.png' will be uploaded in one chunk.
##[debug]Attempt '1' for uploading chunk '1' of file 'screenshots/5_failure.png'.
##[debug]Generate new HttpRequest for uploading file 'screenshots/5_failure.png', chunk '1' of '1'.
##[debug]Start uploading file 'screenshots/5_failure.png' to server, chunk '1'.
##[debug]Finished upload chunk '1' of file 'screenshots/5_failure.png', elapsed 200 (ms), response code 'Created'.
File upload succeed.
Upload 'C:\AzureDevOps-Agents\jessehouwing\_work\6\a\screenshots' to file container: '#/1813075/screenshots'
Associated artifact 1173 with build 1833
##[section]Async Command End: Upload Artifact
##[section]Finishing: Ghost

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

Agent:

OS:

Yarn version: *Yarn version**

Node version: *Node version**

jessehouwing commented 5 years ago

Looks like the window is causing a Mobile/Tablet UI. Forcinf the resolution to be larger may fix this?

defaultViewport <?Object> Sets a consistent viewport for each page. Defaults to an 800x600 viewport. null disables the default viewport. width page width in pixels. height page height in pixels. deviceScaleFactor Specify device scale factor (can be thought of as dpr). Defaults to 1. isMobile Whether the meta viewport tag is taken into account. Defaults to false. hasTouch Specifies if viewport supports touch events. Defaults to false isLandscape Specifies if viewport is in landscape mode. Defaults to false.

sandorfr commented 5 years ago

I published your pull request, can you let me know if it helps, otherwise I need to update my own blog to check this out.

jessehouwing commented 5 years ago

That wasn't good enough... I think they also renamed a bunch of controls on the admin UI

sandorfr commented 5 years ago

I'm so sorry I did not find the time to work on this. the good news is that there is apparently an experimental themes upload api on the latest version. I'll try to get that into an update soon :)

sandorfr commented 5 years ago

Hi @jessehouwing , Just letting you know, that I juset released a new version which uses the admin API. You will need to update your service endpoint to use a token. Let me know how it goes!

jessehouwing commented 5 years ago

Yay! Works!