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

Creating new application breaks without Icon #1035

Closed
cwerstuik opened this issue Apr 29, 2024 · 6 comments
Closed

Creating new application breaks without Icon #1035

cwerstuik opened this issue Apr 29, 2024 · 6 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@cwerstuik
Copy link

Steps to reproduce

  1. Create new application
  2. Fill out info, but don't change icon
  3. Click "Create Application"

Expected behavior

Application is created without errors

Actual behavior

Page goes blank and a couple errors appear saying, "Could not create new table" and "Could not insert application. Unknown error."

Everything works fine when a app icon is manually selected. This is a quick copy/paste from my browser console:

It's sending {"name":"test","iconName":{},"description":"test","nodes":[{"id":9,"type":0,"permissions":7}]}

And receiving Internal Server Error\nOCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100

code: "ERR_BAD_RESPONSE"
​
config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }
​​
adapter: Array [ "xhr", "http" ]
​​
data: '{"name":"test","iconName":{},"description":"test","nodes":[{"id":9,"type":0,"permissions":7}]}'
​​
env: Object { FormData: (), Blob: () }
​​
headers: Object { Accept: "application/json, text/plain, */*", "Content-Type": "application/json", requesttoken: "ko57IushNwmUi42OxKWsvP16R5Bk4zcxbx+0EcLBikU=:ueAUCZpFAGOi4N678JeZ6Ik3N6Mjp05DLmvsfPCP+HU=" }
​​
maxBodyLength: -1
​​
maxContentLength: -1
​​
method: "post"
​​
timeout: 0
​​
transformRequest: Array [ transformRequest(e, t)
 ]
​​
transformResponse: Array [ transformResponse(e)
 ]
​​
transitional: Object { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }
​​
url: "https://***/ocs/v2.php/apps/tables/api/2/contexts"
​​
validateStatus: function validateStatus(e)
​​
xsrfCookieName: "XSRF-TOKEN"
​​
xsrfHeaderName: "X-XSRF-TOKEN"
​​
<prototype>: Object { … }
​
message: "Request failed with status code 500"
​
name: "AxiosError"
​
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
​
response: Object { data: `<?xml version="1.0"?>\n<ocs>\n <meta>\n  <status>failure</status>\n  <statuscode>500</statuscode>\n  <message>Internal Server Error\nOCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100</message>\n </meta>\n <data/>\n</ocs>\n`, status: 500, statusText: "", … }
​​
config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }
​​
data: `<?xml version="1.0"?>\n<ocs>\n <meta>\n  <status>failure</status>\n  <statuscode>500</statuscode>\n  <message>Internal Server Error\nOCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100</message>\n </meta>\n <data/>\n</ocs>\n`
​​
headers: Object { "cache-control": "no-store, no-cache, must-revalidate", "content-length": "444", "content-security-policy": "default-src 'self'; script-src 'self' 'nonce-cjR4YlNZSmo4c2Z4VUgxSGZ5K0JWZC9QN1B4cWZzb2NZLzlua1NBRGtZOD06aE9JMFl2TUh4YTNIT3k1eVN4MjBBYXVDbk04dE9yTnVJb3MvL0JKTjQ3OD0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';", … }
​​
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
​​
status: 500
​​
statusText: ""

And here is the log file error:

{
	"reqId": "MZRcpYI4bHPXR4mhpljG",
	"level": 3,
	"time": "2024-04-29T21:14:31+00:00",
	"remoteAddr": "******",
	"user": "*******",
	"app": "no app in context",
	"method": "POST",
	"url": "/ocs/v2.php/apps/tables/api/2/contexts",
	"message": "OCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100",
	"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0",
	"version": "29.0.0.19",
	"exception": {
		"Exception": "Exception",
		"Message": "OCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100",
		"Code": 0,
		"Trace": [{
			"file": "/var/www/html/lib/private/AppFramework/App.php",
			"line": 184,
			"function": "dispatch",
			"class": "OC\\AppFramework\\Http\\Dispatcher",
			"type": "->",
			"args": [
				["OCA\\Tables\\Controller\\ContextController"], "create"
			]
		}, {
			"file": "/var/www/html/lib/private/Route/Router.php",
			"line": 338,
			"function": "main",
			"class": "OC\\AppFramework\\App",
			"type": "::",
			"args": ["OCA\\Tables\\Controller\\ContextController", "create", ["OC\\AppFramework\\DependencyInjection\\DIContainer"],
				["ocs.tables.context.create"]
			]
		}, {
			"file": "/var/www/html/ocs/v1.php",
			"line": 66,
			"function": "match",
			"class": "OC\\Route\\Router",
			"type": "->",
			"args": ["/ocsapp/apps/tables/api/2/contexts"]
		}, {
			"file": "/var/www/html/ocs/v2.php",
			"line": 23,
			"args": ["/var/www/html/ocs/v1.php"],
			"function": "require_once"
		}],
		"File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
		"Line": 170,
		"Previous": {
			"Exception": "TypeError",
			"Message": "OCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232",
			"Code": 0,
			"Trace": [{
				"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
				"line": 232,
				"function": "create",
				"class": "OCA\\Tables\\Controller\\ContextController",
				"type": "->",
				"args": ["*** sensitive parameters replaced ***"]
			}, {
				"file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
				"line": 138,
				"function": "executeController",
				"class": "OC\\AppFramework\\Http\\Dispatcher",
				"type": "->",
				"args": [
					["OCA\\Tables\\Controller\\ContextController"], "create"
				]
			}, {
				"file": "/var/www/html/lib/private/AppFramework/App.php",
				"line": 184,
				"function": "dispatch",
				"class": "OC\\AppFramework\\Http\\Dispatcher",
				"type": "->",
				"args": [
					["OCA\\Tables\\Controller\\ContextController"], "create"
				]
			}, {
				"file": "/var/www/html/lib/private/Route/Router.php",
				"line": 338,
				"function": "main",
				"class": "OC\\AppFramework\\App",
				"type": "::",
				"args": ["OCA\\Tables\\Controller\\ContextController", "create", ["OC\\AppFramework\\DependencyInjection\\DIContainer"],
					["ocs.tables.context.create"]
				]
			}, {
				"file": "/var/www/html/ocs/v1.php",
				"line": 66,
				"function": "match",
				"class": "OC\\Route\\Router",
				"type": "->",
				"args": ["/ocsapp/apps/tables/api/2/contexts"]
			}, {
				"file": "/var/www/html/ocs/v2.php",
				"line": 23,
				"args": ["/var/www/html/ocs/v1.php"],
				"function": "require_once"
			}],
			"File": "/var/www/html/custom_apps/tables/lib/Controller/ContextController.php",
			"Line": 100
		},
		"message": "OCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100",
		"exception": [],
		"CustomMessage": "OCA\\Tables\\Controller\\ContextController::create(): Argument #2 ($iconName) must be of type string, array given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/html/custom_apps/tables/lib/Controller/ContextController.php' line 100"
	},
	"id": "66301375adae7"
}

Tables app version

0.7.1

Browser

Firefox

Client operating system

Linux

Operating system

Linux

Web server

Apache

PHP engine version

PHP 8.2

Database

MySQL

Additional info

No response

@cwerstuik cwerstuik added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Apr 29, 2024
@blizzz
Copy link
Member

blizzz commented Apr 30, 2024

This should be solved in 0.7.1. Can you try deleting your browser cache?

@cwerstuik
Copy link
Author

I've tried deleting the cache in all the ways that usually work and it's still coming up with this error. I even just tried to completely delete and redownload tables and still has the error

@blizzz
Copy link
Member

blizzz commented Apr 30, 2024

OK actually we missed a backport. #1041 will fix it.

@enjeck
Copy link
Contributor

enjeck commented May 6, 2024

Should be fixed now? @cwerstuik

@cwerstuik
Copy link
Author

cwerstuik commented May 7, 2024

Sorry, I've been on the road, and won't be able to try out the fix until Friday

@blizzz
Copy link
Member

blizzz commented May 8, 2024

Today's 0.7.2 release ships the fix.

@blizzz blizzz closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants