Open bkraul opened 5 years ago
Hmmm...I reverted the line in api_nuget.php
to what it was before the commit, but the second error is still happening, and the push operation is still failing. Neither uploadutils.php
nor nugetreader.php
seem to have recently changed. Any ideas?
Mmmh can you give me the nuspec file of the package you are trying to upload?
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>EPG.CommonLibrary</id>
<version>1.1.21.7096</version>
<title></title>
<authors>EPG Internal Development</authors>
<owners>EPG Internal Development</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Common code library for EPG applications.</description>
<copyright>Copyright © 2016 EPG Insurance, Inc.</copyright>
</metadata>
</package>
The packages were uploading fine up to the last couple of commits.
I think this could result from the absence of the field on the nuspec, i think that a call to if(is_array( on the else could do the work ... this was generated by another guy having an array for the release notes (i always like the clarity and precision of the nuspec specifications :P )
hmmm...let me try adding the field and see if it works.
So, adding the field <releaseNotes/>
did remove the original releaseNotes error, but it still fails with the second error.
This is the command I am using:
.\nuget.exe push .\packages\*.symbols.nupkg [mykey] -source http://my.nugetserver.com/upload
http://sandbox.onlinephpfunctions.com/ with htmlspecialchars(implode(" ",null)); it explode! I think i'll add an if(null!=$e->ReleaseNotes){ ...all the update of the field }
Sounds good, but as I said, I don't think that is the main problem. Because even after putting in the release notes field, the push operation still fails with:
Got error 'PHP message: PHP Notice: Undefined index: sizeBytes in /app/src/inc/commons/uploadutils.php on line 55\nPHP message: PHP Notice: Trying to get property of non-object in /app/src/inc/nugetreader.php on line 192\n'
I can tell that the problem started with the wave of commits after (42cd592). (the ones with #71 Resolved chocolatey special api with Packages
), because I just checked out that one commit and pushing works perfectly. So, not sure what's going on there, there are like 5 commits regarding the special API).
I can confirm commit 5f86b49 is what is breaking the push uploads. I am not sure which specific one of the changes in the commit does, but all the commits before that one work fine.
@kendarorg Quick question. I notice that this commit introduces an IsLatestVersion field to the database. Am I missing a schema upgrade, and could this be the problem (I have mySQL backend)? And if so, how do I apply it to my existing installation?
UPDATE: Nevermind, the field exists in my nugetdb_pkg
table.
Added package \nuget_exes\NoRelease.1.0.0 to test
This is still not resolved. Still getting the error:
Got error 'PHP message: PHP Notice: Undefined index: sizeBytes in /app/src/inc/commons/uploadutils.php on line 56
PHP message: PHP Notice: Trying to get property of non-object in /app/src/inc/nugetreader.php on line 192
I recognized now that you are treating Symbols packages!!
The size is 199KB. The max is 50MB. And yes, I do both (with symbols and without symbols). As mentioned, this worked fine until after commit 5f86b49 .
Tried to reduce the variations... (sorry for the dumb questions, but i am really trying to understand this thing)
if u can give it a try!
I did. Command returns:
C:\Users\bkraul\source\repos\WinForms\EPG.CommonLibrary\EPG.CommonLibrary\.nuget>.\nuget.exe push .\packages\*.symbols.nupkg [key] -source http://nuget.epginsurance.com/upload
Pushing EPG.CommonLibrary.1.1.21.7096.symbols.nupkg to 'http://nuget.epginsurance.com/upload'...
PUT http://nuget.epginsurance.com/upload/
InternalServerError http://nuget.epginsurance.com/upload/ 4778ms
PUT http://nuget.epginsurance.com/upload/
InternalServerError http://nuget.epginsurance.com/upload/ 1708ms
PUT http://nuget.epginsurance.com/upload/
InternalServerError http://nuget.epginsurance.com/upload/ 1413ms
Response status code does not indicate success: 500 (Missing Id and/or Version).
C:\Users\bkraul\source\repos\WinForms\EPG.CommonLibrary\EPG.CommonLibrary\.nuget>
PHP returns:
AH01071: Got error 'PHP message: PHP Notice: Trying to get property of non-object in /app/src/inc/nugetreader.php on line 196
I was having a similar error with this, then upgraded to phpnuget 4.1.0.0 with php7.4.3:
[Mon Mar 30 15:23:44.967523 2020] [php7:error] [pid xxxx] [client xx.xx.xx.xx:61630] PHP Fatal error: Uncaught Error: Call to undefined function zip_open() in /srv/www/choco.domain/src/inc/commons/zipmanager.php:42\nStack trace:\n#0 /srv/www/choco.domain/src/inc/nugetreader.php(126): ZipManager->GenerateInfos()\n#1 /srv/www/choco.domain/src/uploadnupkg.php(67): NugetManager->LoadNuspecFromFile('/srv/www/choco....')\n#2 {main}\n thrown in /srv/www/choco.domain/src/inc/commons/zipmanager.php on line 42, referer: http://choco.domain/
@adrift42 You just need to install php-zip package, and php-curl while you're at it -- and php-mysql if you're using that.
But uploads are still broken.
I am getting an
Got error 'PHP message: PHP Warning: implode(): Invalid arguments passed in /app/src/inc/api_nuget.php on line 128\nPHP message: PHP Warning: implode(): Invalid arguments passed in /app/src/inc/api_nuget.php on line 128\n'
when trying to upload packages. As a result the push operation fails.This started happening after the last set of changes (092f2c1) where this was introduced:
Other subsequent errors are:
However, this one is possible just a result of the original failure.