I’m trying to communicate a licensekey authorization to my server.
Its not working, so I’m trying a test URL that should work - Google - and that is not connecting either.
I did see a topic here which talked about removing headers in Windows, and tried to respect that, but still not working.
int statusCode = 0;
auto options = juce::URL::InputStreamOptions(juce::URL::ParameterHandling::inPostData)
.withConnectionTimeoutMs(10000)
.withStatusCode(&statusCode)
(I’m still on JUCE 7.0.9)
Is there something wrong here:
juce::URL testURL("https://www.google.com");
DBG("Testing connection with Google...");
auto testOptions = juce::URL::InputStreamOptions(juce::URL::ParameterHandling::inAddress)
.withConnectionTimeoutMs(5000);
auto testStream = testURL.createInputStream(testOptions);
if (testStream == nullptr)
{
DBG("Could not connect to Google.");
return false;
}
else
{
DBG("Successfully connected to Google.");
}
Don’t have any firewall or unorthodox proxy setup or anything - just standard.
Bump… has anyone got any ideas for me ? This has been an obstacle. I’ve tried a few things since my OP which don’t work.
Other plugins (almost certainly made by JUCE) in the past few years are authorizing fine. I’m sure its not a local firewall etc. issue.
examples tried:
int statusCode = 0;
auto options = juce::URL::InputStreamOptions(juce::URL::ParameterHandling::inPostData)
.withConnectionTimeoutMs(10000)
.withStatusCode(&statusCode)
.withExtraHeaders("User-Agent: MyPlugin/1.0\r\n"
"Accept: text/html\r\n"
"Content-Type: application/x-www-form-urlencoded\r\n"
"Expect:");
I haven’t done much with JUCE networking but there’s a networking Demo in JUCE’s DemoRunner you could look at and try to reproduce. You could also start a debugger on that line and go spelunking to see what’s going awry internally…
I’ll provide some final feedback here, since it might help someone else.
I had a local problem, even though other plugins from different vendors seemed to authorize fine.
Here’s what seemed to work:
I disabled my network adaptor for my rj45 hardwired network, and just kept the wifi adaptor going
In my Internet Options > LAN Settings, I didn’t have ‘automatically detect settings’ ticked on, even though there was no IP addresses inserted. Reboot.
Things that should have made an impact but seemed not to:
Removed SonicWall Netextender VPN (as it has hooks in the network settings)
Removed OracleVirtualBox as that also had hooks in the networking
Reset SChannel settings in the registry
netsh winsock reset
Seems like that list of 4 things would have made a deeper impact, but after I rebooted several time it still didn’t work. But those two at the top of the list seemed to make it work.