[19:57:56] | <Juliet[m]> | <mstenta[m]> "Give it a try now Juliet :-)" <- It worked! |
[04:32:17] | * farmBOT has joined #farmos |
[09:52:51] | * ktohalloran[m] has joined #farmos |
[09:52:51] | <ktohalloran[m]> | mstenta: Hey Mike, picking our discussion about the aggregator over here. As I mentioned in discourse, the authorization flow is still failing. It now gets through asking the instance for permission, which did successfully prompt me to authorize the aggregator to get my farm data. But then it returns to the aggregator and just stops--it shows the blue alert at the bottom that says "authorizing" and then that goes away and nothing |
[09:52:51] | <ktohalloran[m]> | happens. In terms of requests, the aggregator shows a failed request to api/v2/utils/authorize-farm/4; the error message returned by the API is just "authorization flow failed". Meanwhile, in the instance, every time I follow the auth flow, the logs show a " Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET https://demo02.farmos-demo.com/oauth/token": Method Not Allowed (Allow: POST) in |
[09:52:51] | <ktohalloran[m]> | Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (line 131 of /var/www/html/farmOS/vendor/symfony/http-kernel/EventListener/RouterListener.php)." warning. Maybe it's not related, but it's only clue I have as to what about the flow might be failing. |
[09:54:16] | <mstenta[m]> | Hi ktohalloran! |
[09:54:59] | <mstenta[m]> | Hmm |
[09:56:08] | <mstenta[m]> | That is true that /oauth/token only accepts POST requests... 🤔 |
[09:56:17] | <mstenta[m]> | https://git.drupalcode.org/project/simple_oauth/-/blob/6.0.x/simple_oaut... |
[09:58:05] | <mstenta[m]> | This feels familiar... I'm looking for past discussions... |
[09:58:28] | <mstenta[m]> | Unfortunately paul121 is the Aggregator maintainer and he's away at the moment |
[10:00:19] | <mstenta[m]> | The only reference to oauth/token I can find in the Aggregator code is here: https://github.com/farmOS/farmOS-aggregator/blob/3cef3bcf580a7814b5f7352... |
[10:00:28] | <mstenta[m]> | Which is then used in a POST request (not GET) |
[10:00:47] | <mstenta[m]> | Ooohhh wait... I think I have a hunch.... |
[10:02:03] | <mstenta[m]> | Is it possible that there's a redirect happening on the farmOS server? For example, is the Aggregator trying to make a request to http:// but then that's being redirected to https://? |
[10:02:23] | <mstenta[m]> | In some cases, when a redirect like that happens during a POST request, it gets converted to a GET request |
[10:03:14] | <mstenta[m]> | Ah ha! We DO have an issue open for this! https://github.com/farmOS/farmOS-aggregator/issues/80 |
[10:05:47] | <mstenta[m]> | Unfortunately, that issue is pretty old, so some of the info in it might be in the context of farmOS / Aggregator v1... but the same basic issue applies I think |
[10:06:00] | <mstenta[m]> | Now I'm trying to remember how we worked around that... |
[10:09:46] | <mstenta[m]> | Just to be sure, are you using HTTPS on both the Aggregator and the farmOS instances? |
[10:17:08] | <ktohalloran[m]> | Yes to the instance but apparently not on the aggregator... I think it's because our SSL certificate expired (though I don't really know much about that kind of stuff so maybe not). But let me look into that and get back to you. Thanks! |
[10:17:54] | <mstenta[m]> | OK yea give that a try! |
[14:53:58] | * fosten[m] has joined #farmos |
[14:53:58] | <fosten[m]> | Drupal 11 requires Postgres 16+... Aha! Looks like its time to upgrade before v4! |
[14:54:13] | <mstenta[m]> | Yep... |
[14:54:14] | <mstenta[m]> | And PHP 8.3 |
[14:54:30] | <mstenta[m]> | farmOS 3.x should work find on Postgres 16 |
[14:54:39] | <mstenta[m]> | Not sure about PHP 8.3 though, so might want to wait on that |
[14:54:51] | <mstenta[m]> | s/find/fine/ |