Using http even with overwriteprotocol configured...can't obtain grant on apps

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 22.2.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 10.11
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38
PHP version (eg, 7.4): PHP 7.3.29-1~deb10u1

The issue you are facing:

Brand new install.
Everything seems working. Except when I try to grand access on Mac application or iOS App.

On Mac OS, I have the error message about the http vs https error message.
On iOS I have the NSURL security error and I can see that the url used is with http protocol

Is this the first time you’ve seen this error? (Y/N): Y

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oyy',
  'passwordsalt' => 'hhhh',
  'secret' => 'hhhhh',
  'trusted_domains' => 
  array (
    0 => 'nc.xx.net',
  ),
  'default_phone_region' => 'FR',
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'https://ncx.xx.net',
  'dbname' => 'db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'ncuser',
  'dbpassword' => 'ncpass',
  'installed' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'overwriteprotocol’ => ‘https',
  'overwritehost' => 'ncx.xx.net',
);

I went thru a looooot of posts, tried to add/remove overwriteblabla...nothing worked.

Help ?

I noticed that the URL proposed in the interface as “Link to use to connect apps” is http instead of https. Do you know how is build this information ?

  1. Upgraded to 22.2.3.0
  2. Removed overwritehost
  3. Put a 301 redirect in my apache

Works fine.