Content
SOLVED: Docker migration: Your view is erroneous and could not be processed.
Added by Daniel Müller about 4 years ago
tl;dr: when getting "Your view is erroneous and could not be processed." in docker environment check:
- system setting has proper hostname setting
- proxy is sending correct "Host" and "X-Forwarded-Proto" headers (see below)
- if OP is not running in subdirectory (which should be default in docker) DON'T set OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/
just omit OPENPROJECT_RAILS__RELATIVE__URL__ROOT at all
If OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/ is set the api requests from your browser won't have a hostname set and thus will fail (look into developer mode of your browser).
Hi,
I have migrated from a package based installation to docker. I am now running the latest OP 10 image. After a few hickups with worker/seeder everything seems to run without errors. But when accessing work packages of existing projects I get following message:
Your view is erroneous and could not be processed.
I have tried to get more informations from the web container:
Cache read: _session_id:2::9252f3421389137270b00607f3f81e6f19d2f614ef49cffbb7cc2fb79d110fcb
User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."type" IN ($1, $2, $3, $4, $5) AND "users"."status" = $6 AND "users"."id" = $7 LIMIT $8 [["type", "User"], ["type", "DeletedUser"], ["type", "AnonymousUser"], ["type", "SystemUser"], ["type", "User::InexistentUser"], ["status", 1], ["id", 2], ["LIMIT", 1]]
(0.7ms) SELECT MAX("settings"."updated_on") FROM "settings"
Cache read: /openproject/settings/all/1602361510
Cache fetch_hit: /openproject/settings/all/1602361510
Project Load (0.7ms) SELECT "projects".* FROM "projects" WHERE "projects"."identifier" = $1 LIMIT $2 [["identifier", "sap"], ["LIMIT", 1]]
(0.6ms) SELECT "enabled_modules"."name" FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1 "project_id", 5
Token::RSS Load (0.6ms) SELECT "tokens".* FROM "tokens" WHERE "tokens"."type" = $1 AND "tokens"."user_id" = $2 LIMIT $3 [["type", "Token::RSS"], ["user_id", 2], ["LIMIT", 1]]
EnterpriseToken Load (0.5ms) SELECT "enterprise_tokens".* FROM "enterprise_tokens" ORDER BY created_at DESC LIMIT $1 "LIMIT", 1
(1.0ms) SELECT MAX(union_query.max_updated_at)
FROM ((SELECT MAX(updated_at) AS max_updated_at FROM statuses) UNION (SELECT MAX(updated_at) AS max_updated_at FROM enumerations) UNION (SELECT MAX(updated_at) AS max_updated_at FROM types))
AS union_query
EnabledModule Load (0.4ms) SELECT "enabled_modules".* FROM "enabled_modules" WHERE "enabled_modules"."project_id" = $1 "project_id", 5
Cache read: 8875ffb25f714865d4bb9e7020ec4f275b2efe361055a18c97f904e1d44f0dcd/database_migrations
(0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Cache write: 8875ffb25f714865d4bb9e7020ec4f275b2efe361055a18c97f904e1d44f0dcd/database_migrations
Wiki Load (0.3ms) SELECT "wikis".* FROM "wikis" WHERE "wikis"."project_id" = $1 LIMIT $2 [["project_id", 5], ["LIMIT", 1]]
MenuItems::WikiMenuItem Load (0.4ms) SELECT "menu_items".* FROM "menu_items" WHERE "menu_items"."type" = $1 AND "menu_items"."navigatable_id" = $2 AND "menu_items"."parent_id" IS NULL ORDER BY id ASC [["type", "MenuItems::WikiMenuItem"], ["navigatable_id", 5]]
MenuItem Load (0.3ms) SELECT "menu_items".* FROM "menu_items" WHERE "menu_items"."parent_id" = $1 ORDER BY id ASC "parent_id", 15
WikiPage Exists? (0.3ms) SELECT 1 AS one FROM "wiki_pages" WHERE "wiki_pages"."wiki_id" = $1 LIMIT $2 [["wiki_id", 5], ["LIMIT", 1]]
Project Load (0.3ms) SELECT "projects".* FROM "projects" WHERE "projects"."lft" <= 6 AND "projects"."rgt" >= 7 AND "projects"."parent_id" IS NULL ORDER BY "projects"."name" ASC LIMIT $1 "LIMIT", 1
Version Exists? (0.7ms) SELECT 1 AS one FROM "versions" LEFT OUTER JOIN "projects" ON "projects"."id" = "versions"."project_id" WHERE (((("projects"."id" = $1 OR "projects"."active" = $2 AND "versions"."sharing" = $3) OR "projects"."active" = $4 AND "projects"."id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."lft" >= 5 AND "projects"."lft" < 10 ORDER BY "projects"."name" ASC) AND "versions"."sharing" = $5) OR "projects"."active" = $6 AND "projects"."id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."lft" <= 6 AND "projects"."rgt" >= 7 AND ("projects"."id" != 5) ORDER BY "projects"."name" ASC) AND "versions"."sharing" IN ($7, $8)) OR "projects"."active" = $9 AND "projects"."id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."lft" >= 6 AND "projects"."lft" < 7 ORDER BY "projects"."name" ASC) AND "versions"."sharing" = $10) LIMIT $11 [["id", 5], ["active", true], ["sharing", "system"], ["active", true], ["sharing", "tree"], ["active", true], ["sharing", "hierarchy"], ["sharing", "descendants"], ["active", true], ["sharing", "hierarchy"], ["LIMIT", 1]]
Repository Load (0.3ms) SELECT "repositories".* FROM "repositories" WHERE "repositories"."project_id" = $1 LIMIT $2 [["project_id", 5], ["LIMIT", 1]]
CACHE Project Load (0.0ms) SELECT "projects".* FROM "projects" WHERE "projects"."lft" <= 6 AND "projects"."rgt" >= 7 AND "projects"."parent_id" IS NULL ORDER BY "projects"."name" ASC LIMIT $1 "LIMIT", 1
CACHE Version Exists? (0.0ms) SELECT 1 AS one FROM "versions" LEFT OUTER JOIN "projects" ON "projects"."id" = "versions"."project_id" WHERE (((("projects"."id" = $1 OR "projects"."active" = $2 AND "versions"."sharing" = $3) OR "projects"."active" = $4 AND "projects"."id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."lft" >= 5 AND "projects"."lft" < 10 ORDER BY "projects"."name" ASC) AND "versions"."sharing" = $5) OR "projects"."active" = $6 AND "projects"."id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."lft" <= 6 AND "projects"."rgt" >= 7 AND ("projects"."id" != 5) ORDER BY "projects"."name" ASC) AND "versions"."sharing" IN ($7, $8)) OR "projects"."active" = $9 AND "projects"."id" IN (SELECT "projects"."id" FROM "projects" WHERE "projects"."lft" >= 6 AND "projects"."lft" < 7 ORDER BY "projects"."name" ASC) AND "versions"."sharing" = $10) LIMIT $11 [["id", 5], ["active", true], ["sharing", "system"], ["active", true], ["sharing", "tree"], ["active", true], ["sharing", "hierarchy"], ["sharing", "descendants"], ["active", true], ["sharing", "hierarchy"], ["LIMIT", 1]]
Cache read: 8875ffb25f714865d4bb9e7020ec4f275b2efe361055a18c97f904e1d44f0dcd/help_top_menu_node/api_docs={:href=>"https://docs.openproject.org/api", :label=>:label_api_documentation}/blog={:href=>"https://www.openproject.org/:md5:263b1fe2cace4846c87a3b6bcf988956
Cache fetch_hit: 8875ffb25f714865d4bb9e7020ec4f275b2efe361055a18c97f904e1d44f0dcd/help_top_menu_node/api_docs={:href=>"https://docs.openproject.org/api", :label=>:label_api_documentation}/blog={:href=>"https://www.openproject.org/:md5:263b1fe2cace4846c87a3b6bcf988956
Attachment Load (0.3ms) SELECT "attachments".* FROM "attachments" WHERE "attachments"."container_id" = $1 AND "attachments"."container_type" = $2 AND "attachments"."description" = $3 ORDER BY attachments.created_at LIMIT $4 [["container_id", 2], ["container_type", "Principal"], ["description", "avatar"], ["LIMIT", 1]]
method=GET path=/projects/sap/work_packages format=html controller=WorkPackagesController action=index status=200 duration=70.02 view=45.82 db=9.42 user=2
Cache write: _session_id:2::9252f3421389137270b00607f3f81e6f19d2f614ef49cffbb7cc2fb79d110fcb ({:expires_in=>nil})
But I thinks this is not helpful. I have read in another thread that running "openproject configure" maybe helpful. But as this is a docker installation this doesn't apply here, does it? If it does: how to run "openproject configure" in docker?
Any idea what went wrong or where to get more informations from?
regards
Daniel
Replies (5)
Uhm, just noticed I get the same error when creating a brand new project. And even setting up a brand new database does not help: I have created a new database and set DATABASE_URL to this new one, logged in with "admin"/"admin" and neither newly created nor the demo projects have a working "working package" module :/
Another thing I noticed is that I don't see any query at all. Also in the above logs there is no query onto table "menu_items" nor "queries".
no queries at all
no queries at all
for reference: this is what I would await: https://www.openproject.org/wp-content/uploads/2018/09/Bug-tracking.jpg
Ouch, the queries are requsted via ajax and the ajax query itself is faulty: the hostname is missing... now I have to look what happend here
Found a bug with similiar problems: https://community.openproject.com/projects/openproject/work_packages/29459/activity
Hostname in settings is ok. This is the request from proxy to op web container which IMHO looks good?!
OMG! I found the root cause: OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/
If your OP is running in root without sub directory don't set OPENPROJECT_RAILS__RELATIVE__URL__ROOT at all. If you set it to "/" you will f%*#up. Just removed this environment from docker container and OP is back again!