User Sync doesn't work with SSL

I’m trying to use the User Sync plugin to sync from a master WP install to two other installations (/store is master, /blog and /plus are the others). The sites are local development sites with a self-signed SSL certificate, so they’re not accessible from the outside world. If I turn off SSL, the sync works just fine, so there’s definitely something going on there.

I put the plugin into debug mode to get some logging and the log is extremely vague with no actual error message other than “something went wrong”. This is the entire log file from the /blog installation when I try to connect it:

[2017-03-03 18:48:51] 01 – new subsite conection – central_url=https://test.dev/store;; replace_user=1;; overwrite_user=0;;***

[2017-03-03 18:48:51] 02 – sending request – url=https://test.dev/store/wp-admin/admin-ajax.php?action=user_sync_api;;***

[2017-03-03 18:48:51] 04 – sending request: something went wrong***

  • Adam Czajczyk
    • Support Gorilla

    Hello Jim,

    I hope you’re well today and thank you for your question!

    I’d like to check a bit more debugging info from your site so could you please:

    1. enable WordPress debugging on master and sub-sites by adding following code to the “wp-config.php” file of each of these sites:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    This code should be located above the “/* That’s all, stop editing… */” line

    2. try syncing users among your sites again

    3. after it fails grab the /wp-content/debug.log files from each site and rename them the way I knew which one belongs to which site, also changing file extensions from “.log” to “.txt”

    4. attach these files to your response here.

    Hopefully that will give us a bit better insight and help find a solution for you.

    Best regards,

    Adam

  • Jim
    • WPMU DEV Initiate

    Hey Adam,

    I can't even get the subsites to connect when I have SSL turned on. I already had debugging set up, but there is nothing in the log for either the master or sub sites when the connection fails. I just get this on the front end for each of the subsites and the other "something went wrong" error in the plugin log.

    [attachments are only viewable by logged-in members]

  • Adam Czajczyk
    • Support Gorilla

    Hello Jim!

    Thank you for your replay.

    Can you confirm that the User Sync plugin does work with no-SSL? I’m wondering whether this is related to SSL or if there’s an “underlying” issue with connectivity. Would it be possible that you try this with no-SSL just to test that?

    Best regards,

    Adam

  • Dimitris Kalliris
    • Support Team Lead

    Hey there Jim,

    hope you’re doing good and don’t mind chiming in! :slight_smile:

    I also tried to replicate this using two single installations under the same domain using subfolders and even that domain is secured with a Let’s Encrypt certificate, the synchronisation went through successfully! :thinking:

    Is there any chance to test this in a live server? Please advise!

    Warm regards,

    Dimitris

  • Jim
    • WPMU DEV Initiate

    I have tried self-signed certs on a dev site on a live server and had no luck there either. The actual live sites will have a real non-self-signed SSL cert so it will likely work there, but we need to be able to use it in our dev environments too :slight_frown:

  • Predrag Dubajic
    • Support

    Hi Jim,

    Thanks for all the information provided, I was doing some testing based on all of the above and after setting this up on flywheel local installation with self signed SSL I was able to replicate the issue.

    I’m afraid that I was unable to determine the cause of this but I have created bug report and forwarded it to our developers.

    Are you perhaps using local by flywheel for testing as well?

    Best regards,

    Predrag