#Uncaught Appwrite\\AppwriteException: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
46 messages · Page 1 of 1 (latest)
can you try withPath instead? https://github.com/appwrite/playground-for-php/blob/4d4c52516602da7f74d0206d369112bd343f5f8d/playground.php#L255
Same error
Are you connecting to Appwrite cloud?
No, self hosted behind Cloudflare Tunnel
v1.3.6
Does uploading the same file via the Appwrite console work okay?
Yes
And via CLI
Any idea?
Is your PHP is "outside" of your Appwrite.
If so is your Cloudflare tunnel is http to https?
Check these two links to check and verify.
#1110283100497379370 message
#1110283100497379370 message
You mean, try pointing directly to Appwrite without Cloudflare? Will try
No, on a web server
Okay, is your tunnel is pointing to HTTP or HTTPS?
It's HTTPS externally, pointing to the Appwrite HTTP port
So first, change it also to be HTTPS internally
You can check the link here #1110283100497379370 message and the message over there to make sure
Then, When it is HTTPS can you try again?
Same error
So, I decided to try simplifying. I created a testfile.txt with one line of random text, then did:
$storage->createFile('[MY_BUCKET_ID]', 'test-file', Appwrite\InputFile::withPath('testfile.txt'))
Error:
PHP Fatal error: Uncaught Appwrite\\AppwriteException: File extension not allowed
Make sure you're allowing the txt extension in your Bucket settings.
That was it - thank you!
Well, I spoke too soon - the first error (HTTP/2 stream 0 was not closed cleanly) is back
Sometimes the same file will upload one time and error another time
Also, sometimes the upload seems to work, but the uploaded file is 0 bytes, and says the filename is "data://"
It's detected the correct mime-type, though
I'm checking the Appwrite logs to see if there's anything useful there. There's nothing at the time I make a request, but I did find a lot of these:
[Error] Timestamp: 2023-06-09T17:17:07+00:00
[Error] Type: Utopia\Exception
[Error] Message: Not Found
[Error] File: /usr/src/code/vendor/utopia-php/framework/src/App.php
[Error] Line: 795
something seems to be closing the connection...maybe it's cloudflare...maybe it's appwrite 🤷🏼♂️
And also this:
[2023-06-09 15:13:47 $9.0] WARNING Server::check_worker_exit_status(): worker(pid=12, id=0) abnormal exit, status=0, signal=11
A bug occurred in Swoole-v4.8.10, please report it.
The Swoole developers probably don't know about it,
and unless you report it, chances are it won't be fixed.
You can read How to report a bug doc before submitting any bug reports:
>> https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md
Please do not send bug reports in the mailing list or personal letters.
The issue page is also suitable to submit feature requests.
OS: Linux 5.15.83-1-pve #1 SMP PVE 5.15.83-1 (2022-12-15T00:00Z) x86_64
GCC_VERSION: 10.3.1 20211027
OPENSSL_VERSION: OpenSSL 1.1.1t 7 Feb 2023
PHP_VERSION : 8.0.18
Worker 1 started successfully
Will try connecting directly
i've seen this when i try to use XDebug 👀 you're not running from source, right?
Not sure what you mean by that - this is just a PHP webpage
Oh that - that's from docker compose logs
Seems to work perfectly when I point directly.
I meant running Appwrite from source
It must be cloudflare closing the connection form some reason
I'm running Appwrite with docker compose - I installed with the docker run command on the self hosting page
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.3.6```
Ah okay. It must be a cloudflare tunnel problem then
Well, uploads are working. But when I tried downloading (with $storage->getFileDownload(), I just get what looks like a base64 string?
I had a look at the getFileDownload() function, and I saw it sets a Content-type: application/json header. When I remove that, I get back the file.
oh that does sound like a bug
Can confirm it's also in the Python SDK
Also, when I download a file direct from the Appwrite dashboard, I get what looks like the same base64 string. The request from the dashboard does not contain a Content-type: application/json header