-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Unable to send messaging after updating to 7.10.0 #888
Comments
When my online version was restored to 7.9.1, the functions returned to normal and messaging could be sent normally. |
Someone reported something similar a few days ago, perhaps reading through that issue might help: 7.10 doesn't use the legacy FCM API anymore, and uses the HTTP V1 API with HTTP/2 instead, because the legacy API will be shut down by the end of June. I understand that it's a minor release breaking your server environment, but still, please make sure that your remote server is properly configured and and has the latest dependencies (especially cURL) installed. I have no means of testing why it works locally but not on the server, there are too many unknowns. But if you can tell me the differences between your local and remote environment, I might be able to introduce a condition to use a fallback mechanism. |
Thank you for your reply, I am looking for the problem based on your tips and I will get back to you if it is resolved. |
I have the same issue. Updating 7.9 to 7.10/7.11 made me unable to send any message. |
Please share the output of the following CLI commands in the environment in which you encounter the issue: curl --version and (as you were asked when creating the issue) composer show --platform |
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.90 zlib/1.2.7 libidn/1.28 libssh2/1.8.0 composer 2.7.2 Composer package Is my problem caused by outdated curl? I am using Centos 7.9 and it seems to be stuck on curl version 7.29 though. yum update curl libcurl does nothing. It said that curl is already latest version. Even though latest version is actually 8.8.0 >_> |
Thank you for providing me with the information! HTTP/2 support has been available since version 7.47 (which was released in 2016). I believe that should indeed be the issue. However, I assume(d) that the line
would mean that PHP is using a newer version of In order to test this, could you please execute the following in the environment that doesn't work? php -i | grep HTTP2 It should output something like |
Uh oh. The reply is dreadfully: What can I do to fix this? |
I seem to be in the same situation, how to solve it? |
7.9 would continue to work after June 30th - it already uses the new endpoints, but calls them synchronously instead of asynchronously since 7.10 (for better performance). I could implement a check if HTTP/2 is supported - if it isn't, the SDK could do synchronous requests instead of asynchronous requests (which would result in the slower performance that the change improved). I hope you can understand that I can't stop introducing new features or improve existing ones just because server dependencies are outdated. I can implement the needed checks and different behavior, but I can't do it for free. I can get started with it as soon as I get $500 in total of GitHub sponsorships. It can be a one time sponsorship or a recurring one, as long as it reaches $500 in one month. If you make money with the help of the SDK, this shouldn't be too much. If you don't want to go this route, you can either stay with 7.9 (and miss out on future improvements and features). The best way to solve the problem would, of course, making sure that your server environment has a current version of cURL installed. In the end, it all depends on how much you value your (or your team's) time, and the benefits of free Open Source software. Thank you for your understanding! |
Yeah, I can confirm through my browser that my website is already served using http2. Also running curl on ssh does result in http2 working. The problem seems to be solely on my php binary. Centos 7.9 installed a precompiled version in which php's curl extension does not work with http2. Maybe I should compile it myself or something. Thank you for the kind response, Jerome. Even though you are doing this project for free. I think it's fine to leave it like this if 7.9 will continue to work after 30 June. Don't bother with adding extra check here and there. Centos 7.9 itself will reach it's end of life soon anyway. I can always install Ubuntu 24.04 in the future. |
This didn't seem to be it. |
Could you please test with #903 if this solves the issue? |
Unfortunately, the end result is the same. That must be because echoing those constants on my server returning this: Well.. even if they are 'undefined', this pull request still won't fix the problem, because I have tried doing drastic measure. Another drastic measure. Next, instead of removing ->withProtocolVersion('2.0'), I tried changing 2.0 to both 1.1 and 1.0. |
Hm, if the constants are set, HTTP/2 is supported by your environment, and this isn't the solution. Are you using a proxy? |
I use Webuzo as control panel on Centos 7.9. It is the one who installed Apache 2.4, MySQL 8.0, PHP-FPM, PHP81 and PHP82 on my server. |
For the time being, staying on 7.9 seems to be the best option, and it has no bugs or missing features, so you should be good for the foreseeable future. But if you happen to find the reason, I'd be not the only one to appreciate if you shared it here. My offer from a few posts ago still stands 😊 - or, of course, if it is something in the current implementation that can be done, I'll need a pointer what it is 😅 |
Yeah I am staying for the time being. |
Describe the bug
Running environment: PHP8.1 / "kreait/firebase-php":7.10.0
My local development environment is: windows
The online server environment is: Debian GNU/Linux 12 x86_64 (Py3.7.16)
When I was developing locally, I had no problem using 7.10.0 and could send messages normally. When my online server was updated to 7.10.0, I could not send messages. The error message was:
URL error 0: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong. See https://bugs.php.net/bug.php?id=47204 for more information. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://fcm.googleapis.com/v1/projects/flutter-receive-sms/messages:send
Additionally an error page is returned.
411 Error. POST requests require a Content-length header. That’s all we know
Installed packages
PHP version and extensions
Steps to reproduce the issue.
Error message/Stack trace
Additional information
No response
The text was updated successfully, but these errors were encountered: