semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Problem: Page "Task Templates" doesnt load

Open CAV-cloud opened this issue 4 months ago • 11 comments

Issue

I have installed semaphore on my ubuntu. I can login and create ssh-keys, repositories and inventories. But after i have done that the Task Templates tab won't load anymore. When i have an empty project i can open it. I ran it as a deb and using docker compose and both have the same issue. Used sqlite.

Impact

Web-Frontend (what users interact with)

Installation method

Docker

Database

No response

Browser

Firefox

Semaphore Version

v2.16.18-80549f7-1755759973

Ansible Version


Logs & errors

Logs showed no errors:

Starting semaphore server Loading config Validating config SQLite @/var/lib/semaphore/database.sqlite Tmp Path (projects home) /tmp/semaphore Semaphore v2.16.18-80549f7-1755759973 Interface Port :3000 Server is running

Manual installation - system information

NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)"

Configuration

{ "sqlite": { "host": "/root/semaphore/database.sqlite" }, "dialect": "sqlite", "tmp_path": "/tmp/semaphore", "max_task_duration_sec": 10800, }

Additional information

No response

CAV-cloud avatar Aug 29 '25 10:08 CAV-cloud

Hi @CAV-cloud do you see any errors in logs:

  • docker container logs
  • browser devtool logs

fiftin avatar Sep 02 '25 20:09 fiftin

I also am seeing this problem. Maybe happened after I added a SSH key. Here's the loads from my docker, seems like it's crashing.

Starting semaphore server
Loading config
Validating config
MySQL semaphore@mysql:3306 semaphore
Tmp Path (projects home) /tmp/semaphore
Semaphore v2.16.45-cbd5620-1762540215
Interface 
Port :3000
Server is running
time="2025-11-11T07:59:13-05:00" level=error msg="gorp: no fields [hidden type filter sort_column sort_reverse] in type View"
goroutine 12 [running]:
runtime/debug.Stack()
	/usr/local/go/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
	/usr/local/go/src/runtime/debug/stack.go:18 +0x13
github.com/semaphoreui/semaphore/api/helpers.WriteError({0x2956690, 0xc000192380}, {0x2951360, 0xc0000a5aa0})
	/go/src/semaphore/api/helpers/write_response.go:52 +0x192
github.com/semaphoreui/semaphore/api/projects.GetViews({0x2956690, 0xc000192380}, 0xc0003083c0)
	/go/src/semaphore/api/projects/views.go:60 +0x265
net/http.HandlerFunc.ServeHTTP(0xc000233460?, {0x2956690?, 0xc000192380?}, 0xc0000a5800?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/api.Route.GetMustCanMiddleware.func5.1({0x2956690, 0xc000192380}, 0xc0003083c0)
	/go/src/semaphore/api/projects/project.go:62 +0x127
net/http.HandlerFunc.ServeHTTP(0xc0000b5b80?, {0x2956690?, 0xc000192380?}, 0xf990a0?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/api/projects.ProjectMiddleware.func1({0x2956690, 0xc000192380}, 0xc0000b4b40)
	/go/src/semaphore/api/projects/project.go:46 +0x41f
net/http.HandlerFunc.ServeHTTP(0x2956690?, {0x2956690?, 0xc000192380?}, 0xe9b580?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/api.authentication.func1({0x2956690, 0xc000192380}, 0x1?)
	/go/src/semaphore/api/auth.go:278 +0x50
net/http.HandlerFunc.ServeHTTP(0xf76340?, {0x2956690?, 0xc000192380?}, 0xc?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/api.JSONMiddleware.func1({0x2956690, 0xc000192380}, 0xc0000b4500)
	/go/src/semaphore/api/router.go:57 +0xf6
net/http.HandlerFunc.ServeHTTP(0xe8cd00?, {0x2956690?, 0xc000192380?}, 0x7a9bcc?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/api.StoreMiddleware.func1.1()
	/go/src/semaphore/api/router.go:48 +0x28
github.com/semaphoreui/semaphore/db.StoreSession({0x296b000, 0xc00015abb8}, {0xc00043d4b0, 0xc}, 0xc0002337c8)
	/go/src/semaphore/db/Store.go:696 +0x5f
github.com/semaphoreui/semaphore/api.StoreMiddleware.func1({0x2956690, 0xc000192380}, 0xc0000b4500)
	/go/src/semaphore/api/router.go:47 +0x114
net/http.HandlerFunc.ServeHTTP(0xc0000b4000?, {0x2956690?, 0xc000192380?}, 0xf00160?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/cli/cmd.runService.func1.1({0x2956690, 0xc000192380}, 0xc0000a48a0?)
	/go/src/semaphore/cli/cmd/root.go:152 +0x11b
net/http.HandlerFunc.ServeHTTP(0xc000233801?, {0x2956690?, 0xc000192380?}, 0x4198e5?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/api.Route.CORSMethodMiddleware.func2.1({0x2956690, 0xc000192380}, 0xc00048d680)
	/go/src/semaphore/vendor/github.com/gorilla/mux/middleware.go:51 +0x87
net/http.HandlerFunc.ServeHTTP(0xc00048d400?, {0x2956690?, 0xc000192380?}, 0x7b0c44c11710?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000a6480, {0x2956690, 0xc000192380}, 0xc00048d040)
	/go/src/semaphore/vendor/github.com/gorilla/mux/mux.go:212 +0x1e2
github.com/semaphoreui/semaphore/cli/cmd.runService.ProxyHeaders.func3({0x2956690, 0xc000192380}, 0xc00048d040)
	/go/src/semaphore/vendor/github.com/gorilla/handlers/proxy_headers.go:59 +0x143
net/http.HandlerFunc.ServeHTTP(0xc00003d804?, {0x2956690?, 0xc000192380?}, 0x1?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
github.com/semaphoreui/semaphore/cli/cmd.runService.cropTrailingSlashMiddleware.func5({0x2956690, 0xc000192380}, 0xc00048d040)
	/go/src/semaphore/cli/cmd/server.go:27 +0xbd
net/http.HandlerFunc.ServeHTTP(0x471b19?, {0x2956690?, 0xc000192380?}, 0xc000233b70?)
	/usr/local/go/src/net/http/server.go:2294 +0x29
net/http.serverHandler.ServeHTTP({0xc00035bad0?}, {0x2956690?, 0xc000192380?}, 0x6?)
	/usr/local/go/src/net/http/server.go:3301 +0x8e
net/http.(*conn).serve(0xc0000126c0, {0x2958738, 0xc000329800})
	/usr/local/go/src/net/http/server.go:2102 +0x625
created by net/http.(*Server).Serve in goroutine 1
	/usr/local/go/src/net/http/server.go:3454 +0x485

J-Bland avatar Nov 11 '25 13:11 J-Bland

Same error in my logs too here atm. Everything is good but Tasks.

patrickmogul avatar Nov 11 '25 19:11 patrickmogul

Hi @J-Bland @patrickmogul Do you use Docker image? If so, it is latest tag issue. I accidentally tagged version 2.17.0-betaXX with this tag.

To fix the issue you need to do manual opration:

  1. install 2.17.0-beta20
  2. use container interactive mode to run command semaphore migrate --undo-to 2.16.100
  3. install 2.16.45

fiftin avatar Nov 11 '25 20:11 fiftin

Ran through that, now this error is in the log when I try to view my tasks on 2.16.45

--redacted above for info removal but everything normal through server is running-- Tmp Path (projects home) /tmp/semaphore Semaphore v2.16.45-cbd5620-1762540215 Interface Port :3000 Server is running

time="2025-11-11T14:54:37-06:00" level=error msg="json: cannot unmarshal object into Go value of type []db.SurveyVar" goroutine 55 [running]: -- can include junk after this if needed

patrickmogul avatar Nov 11 '25 21:11 patrickmogul

@patrickmogul do you have access to the database?

fiftin avatar Nov 11 '25 21:11 fiftin

Yep! I can hit it directly if needed and have a backup pre-changes (unfortunately, after Watchtower upgraded me).

patrickmogul avatar Nov 11 '25 21:11 patrickmogul

@patrickmogul It looks like project__template->survey_vars issue. It must be valid JSON array.

I'm currently fixing the handing of incorrect survey_vars value (to prevent API error, but writing the error details to log). The fix will be included in the next patch.

fiftin avatar Nov 11 '25 21:11 fiftin

Thanks for your efforts, I will check back later this week

patrickmogul avatar Nov 11 '25 21:11 patrickmogul

Hi @J-Bland @patrickmogul Do you use Docker image? If so, it is latest tag issue. I accidentally tagged version 2.17.0-betaXX with this tag.

To fix the issue you need to do manual opration:

  1. install 2.17.0-beta20
  2. use container interactive mode to run command semaphore migrate --undo-to 2.16.100
  3. install 2.16.45

Thanks that worked for me

aSilentSniper avatar Nov 29 '25 10:11 aSilentSniper

Thanks for the fix! this worked for me, too

Hi @J-Bland @patrickmogul Do you use Docker image? If so, it is latest tag issue. I accidentally tagged version 2.17.0-betaXX with this tag.

To fix the issue you need to do manual opration:

  1. install 2.17.0-beta20
  2. use container interactive mode to run command semaphore migrate --undo-to 2.16.100
  3. install 2.16.45

what i did was pull semaphoreui/semaphore:v2.17.0-beta21 since beta20 doesnt exist anymore, and theres a v infront. then i used the command and rebooted back to semaphoreui/semaphore:latest. works perfect again

shoutout from semaphore on kubernetes cluster. i made my service a LoadBalancer so it gets its own IP in the local network and can do everything inside and outside the cluster! :3

i use the api calls to be able to call them from my telegram bot, from my asterisk pbx, and from home assistant.. so i can ask my voice assistant to reboot certain services that sometimes need to be restarted (like a bandaid fix because i have like 50 other projects i have to finish first) and update, even one that runs clamshell av everywhere so my SIEM manager can get all the logs at once if we ever had anything weird happen on the network. ansible is a really powerful tool in our toolkit and semaphore is like an ultra super power for that... so, thanks for all you do. running tasks from an api call is the coolest thing ever. i have some tools that run a script that like collects information from a bunch of different services, and i dockerized it just to be able to run it with ansible so i can use a telegrambot command to call the api, have that do its thing and then output back into telegram once it finishes.. all that cool stuff just super insanely simple to set up in semaphore.

so really honestly truely, thank you!

Mrs-Feathers avatar Dec 04 '25 05:12 Mrs-Feathers