Bug 546208 - Packagist search returns no results.
Summary: Packagist search returns no results.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-08 14:31 EDT by Ferry Cools CLA
Modified: 2020-05-14 11:18 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot composer.json editor (18.86 KB, image/png)
2019-04-08 14:31 EDT, Ferry Cools CLA
no flags Details
PX logfile (5.60 KB, text/plain)
2019-04-09 07:13 EDT, Ferry Cools CLA
no flags Details
Eclipse Network Connections, using the px utility. (21.05 KB, image/png)
2019-04-17 02:02 EDT, Ferry Cools CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferry Cools CLA 2019-04-08 14:31:46 EDT
Created attachment 278169 [details]
Screenshot composer.json editor

When searching for packages in the composer.json editor (at the dependencies tab), there are no results returned.

Steps to reproduce:
1) Open a composer.json file.
2) Select tab dependencies.
3) Start typing in the field at the top-right side (at Packagist Search).

Actual Result:
The box at the bottom-right side remains empty.

Expected Result:
List of packages at the bottom-right side which match the search pattern.

Builds:
Eclipse IDE for PHP Developers 20190314-1200
PHP Development Tools (PDT) Composer Support	6.2.0.201904051050 org.eclipse.php.composer.feature.group Eclipse PDT
Comment 1 Thierry BLIND CLA 2019-04-09 04:33:58 EDT
Hi Ferry,
it works nicely in my case.
Maybe your eclipse has no internet access, did you correctly set the proxy settings under the eclipse "Network Connections" preferences tab?

Thierry.
Comment 2 Ferry Cools CLA 2019-04-09 07:13:54 EDT
Created attachment 278182 [details]
PX logfile
Comment 3 Ferry Cools CLA 2019-04-09 07:15:48 EDT
(In reply to Thierry BLIND from comment #1)
> Hi Ferry,
> it works nicely in my case.
> Maybe your eclipse has no internet access, did you correctly set the proxy
> settings under the eclipse "Network Connections" preferences tab?
> 
> Thierry.

Dear Thierry,

Thank you for helping me out.
My connection runs through the px utility (https://github.com/genotrance/px) because i'm behind a company proxy.
I've added the logfile as an attachment.
Comment 4 Thierry BLIND CLA 2019-04-09 10:39:15 EDT
Hi Ferry,
I have then another question: when you use the "Eclipse Marketplace" (under the Help menu), do you get the search results?
Just to be sure that in your case it is not a general eclipse configuration problem.

Thierry.
Comment 5 Ferry Cools CLA 2019-04-09 12:16:04 EDT
Yes, I can query the marketplace using the client.
I can also install and update plugins using the client and from the update sites.

Because of this, I didn't try before, but...

When "Use automatic configuration script" at Internet options is unchecked and changing the active provider in Eclipse to "DIRECT" does populate the list.
Comment 6 Thierry BLIND CLA 2019-04-11 10:06:45 EDT
(In reply to Ferry Cools from comment #5)
> Yes, I can query the marketplace using the client.
> I can also install and update plugins using the client and from the update
> sites.
> 
> Because of this, I didn't try before, but...
> 
> When "Use automatic configuration script" at Internet options is unchecked
> and changing the active provider in Eclipse to "DIRECT" does populate the
> list.

Hi Ferry,
thank you for your tests, glad you found a workaround.
i think I see the probem, we don't take care about all proxy settings.
I'll try to do a patch soon, I will need your help to test it (by retrieving PDT night builds), because I don't have on my side complex proxy networks to really reproduce the problem :/

Thierry.
Comment 7 Ferry Cools CLA 2019-04-11 14:23:37 EDT
(In reply to Thierry BLIND from comment #6)
> I'll try to do a patch soon, I will need your help to test it (by retrieving
> PDT night builds), because I don't have on my side complex proxy networks to
> really reproduce the problem :/
> 
> Thierry.

Not a problem at all to help you testing it.
If you provide me a link, I'll add it to my "Available Software Sites"??
Comment 8 Thierry BLIND CLA 2019-04-12 05:50:46 EDT
(In reply to Ferry Cools from comment #7)
> (In reply to Thierry BLIND from comment #6)
> > I'll try to do a patch soon, I will need your help to test it (by retrieving
> > PDT night builds), because I don't have on my side complex proxy networks to
> > really reproduce the problem :/
> > 
> > Thierry.
> 
> Not a problem at all to help you testing it.
> If you provide me a link, I'll add it to my "Available Software Sites"??

Yes sure, I'll do that.
But please be patient, I'm sadly quite busy lately :/

Thierry.
Comment 9 Thierry BLIND CLA 2019-04-12 06:04:10 EDT
And for my tests,
is it possible to have more informations how you initially configured the network connections in eclipse, and how you configured your px utility?
You can (and should) of course anonymize all your private datas you send here (like ip, user creditentials, ...)

Because for now I cannot reproduce your problem (even if I think we could do better proxy handling), maybe setting the active provider in Eclipse to "DIRECT" was simply the "right" thing to do in your case.

Thierry.
Comment 10 Eclipse Genie CLA 2019-04-16 12:19:03 EDT
New Gerrit change created: https://git.eclipse.org/r/140698
Comment 11 Ferry Cools CLA 2019-04-17 02:00:46 EDT
(In reply to Thierry BLIND from comment #9)
> is it possible to have more informations how you initially configured the
> network connections in eclipse, and how you configured your px utility?

Eclipse: See attachment.
PX:
[proxy]
server = 
port = 3128
listen = 127.0.0.1
allow = *.*.*.*
gateway = 0
hostonly = 0
noproxy = 127.0.0.*,192.168.*.*
useragent = 
username = DOMAIN\userName

[settings]
workers = 2
threads = 5
idle = 30
socktimeout = 20.0
proxyreload = 60
foreground = 0
log = 1

Internet Options > Connections > LAN Settings:
Use automatic configuration script, Address: http://domainName:port/wpad.dat

 
> Because for now I cannot reproduce your problem (even if I think we could do
> better proxy handling), maybe setting the active provider in Eclipse to
> "DIRECT" was simply the "right" thing to do in your case.

Setting the active provider to DIRECT:
- Will mess up my connection when I'm behind the company proxy (at work)
- Will work fine at home.

Configuring the proxy entries to use the company proxy directly:
- Will mess up my connection at home, because the proxy isn't available outside the company network.
- Will work at work, but limited (Apps which don't support NTLM auth, do not work).

That's where the px utility kicks in:
Px is a HTTP(s) proxy server that allows applications to authenticate through an NTLM or Kerberos proxy server, typically used in corporate deployments, without having to deal with the actual handshake. It is primarily designed to run on Windows systems and authenticates on behalf of the application using the currently logged in Windows user account.

Viewing the attached px log, I think the following is strange:
The first GET request to packagist at line 13, receives a 407 (Proxy Authentication Required) response at line 19. I assume this means I need to authenticate at the company proxy and this successfully finishes.)
The second GET request to packagist at line 35, receives a 302 (Found redirect) response at line 41, while I would expect a 200 (OK) response and the json data.
Comment 12 Ferry Cools CLA 2019-04-17 02:02:01 EDT
Created attachment 278307 [details]
Eclipse Network Connections, using the px utility.
Comment 14 Thierry BLIND CLA 2019-04-17 07:01:23 EDT
Hi Ferry,
thank you for your very detailed network configuration.

I've merged a patch that should do better proxy authentication (before this patch, proxy authentication probably never worked in our composer plugin), it should hopefully solve your problem.
Your configuration is a very complex one, I cannot really simulate it easily on my side, but for sure there was room for improvement in our network code ;)

Could you try latest latest PDT nightly build, please?

In eclipse, add http://download.eclipse.org/tools/pdt/updates/6.3 as new "available software site" and check for updates.

Thank you!

Thierry.
Comment 15 Ferry Cools CLA 2019-04-17 11:32:57 EDT
Hi there,

I'm happy to report, the package list gets populated at version 6.3.0.201904170838.
This is with the same configuration and as well at home as at behind the company proxy.

Congrats and thank you very much.
If I can be of any kind of assistance, please contact me.

Grtz, Ferry.
Comment 16 Thierry BLIND CLA 2019-04-17 12:12:21 EDT
(In reply to Ferry Cools from comment #15)
> Hi there,
> 
> I'm happy to report, the package list gets populated at version
> 6.3.0.201904170838.
> This is with the same configuration and as well at home as at behind the
> company proxy.
> 
> Congrats and thank you very much.
> If I can be of any kind of assistance, please contact me.
> 
> Grtz, Ferry.

Thank you for your testings & feedback, Ferry ;)
Glad my patch helped ;)

Thierry.