"Publish Site" Build Step succeeds but resulting page returns a 500 http error (OD-1195)
Closed
Philipp Gaßner opened 1 year ago

Given the following buildspec file:

version: 19
jobs:
- name: Create docs
  jobExecutor: Main
  steps:
  - !CheckoutStep
    name: Checkout
    cloneCredential: !DefaultCredential {}
    withLfs: false
    withSubmodules: false
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !RunContainerStep
    name: phpdoc
    image: phpdoc/phpdoc:3
    args: -d src/ -t docs/
    volumeMounts:
    - sourcePath: .
      targetPath: /data
    useTTY: false
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !PublishSiteStep
    name: publish
    artifacts: docs/**
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  retryCondition: never
  maxRetries: 3
  retryDelay: 30
  timeout: 3600

my build job succeeds (see log below)

16:18:18 Pending resource allocation...
16:18:18 Executing job (executor: Main, server: 127.0.0.1:5701, network: Main-5-25-0)...
16:18:18 Setting up job cache...
16:18:19 Copying job dependencies...
16:18:19 Running step "Checkout"...
16:18:19 Checking out code...
16:18:21 Switched to branch 'master'
16:18:21 Branch 'master' set up to track remote branch 'master' from 'origin'.
16:18:21 Step "Checkout" is successful
16:18:21 Running step "phpdoc"...
16:18:23 phpDocumentor dev-master@eec5cc7
16:18:23 
16:18:23 Parsing files
16:18:23 
16:18:23  1/3 [=========>------------------]  33%
16:18:23  2/3 [==================>---------]  66%
16:18:23 
16:18:23 Applying transformations (can take a while)
16:18:23  3/3 [============================] 100%
16:18:23   1/22 [=>--------------------------]   4%
16:18:23   3/22 [===>------------------------]  13%
16:18:23   7/22 [========>-------------------]  31%
16:18:23  16/22 [====================>-------]  72%
16:18:23  18/22 [======================>-----]  81%
16:18:23 
16:18:23 All done in 1 seconds!
16:18:23  22/22 [============================] 100%
16:18:23 Step "phpdoc" is successful
16:18:23 Running step "publish"...
16:18:23 Site published as https://git.cyber.psych0si.is/modal-php/~site
16:18:23 Step "publish" is successful
16:18:24 Job finished

But then, when I want to visit the page with the link I get, I only get

HTTP ERROR 500 Internal server error: check server log for details

URI: /modal-php/~site STATUS: 500 MESSAGE: Internal server error: check server log for details SERVLET: io.onedev.server.web.DefaultWicketServlet$$EnhancerByGuice$$159884065-77b71c9 Powered by Jetty:// 9.4.43.v20210629

--

Where do I find logs? When I try to publish a site with a simple index.html page it works as expected...

Philipp Gaßner commented 1 year ago

I updated the build spec so that it matches the path which the working index.html uses, but the problem STILL persists.

EDIT: I was in a non existant subfolder. (404?). I tried going to /~site and I got plain html without js and css. Then I explicitly went to / and now it works

version: 19
jobs:
- name: Create docs
  jobExecutor: Main
  steps:
  - !CheckoutStep
    name: Checkout
    cloneCredential: !DefaultCredential {}
    withLfs: false
    withSubmodules: false
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !RunContainerStep
    name: phpdoc
    image: phpdoc/phpdoc:3
    args: -d src/ -t docs/
    volumeMounts:
    - sourcePath: .
      targetPath: /data
    useTTY: false
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !PublishSiteStep
    name: publish
    sourcePath: docs
    artifacts: '**'
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  retryCondition: never
  maxRetries: 3
  retryDelay: 30
  timeout: 3600
Robin Shen changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
Robin Shen commented 1 year ago

This bug will be addressed in 8.0.0, with fix for issue #1168

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (4)
Reference
OD-1195
Please wait...
Page is in error, reload to recover