Closed Bug 778673 Opened 12 years ago Closed 12 years ago

Caught exception in Bugzilla::API::Controller::Bug->bug "Can't use string ("HTTP::Message content must be by"...) as a HASH ref while "strict refs" in use at /var/www/bzapi/script/../lib/Bugzilla/API/Model/Utils.pm line 686, <> line 2."

Categories

(Webtools Graveyard :: BzAPI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: jon.skarpeteig, Assigned: gerv)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

POST: {"product":"NA","component":"NA","summary":"BugzillaID:128731 rest of summary string","version":"alpha","op_sys":"All","platform":"PC","priority":"P2","severity":"normal","status":"NEW","cf_export":"Enable","cf_summary":"long string","cf_id":"123"}

URI: https://bugzilla:443/bzapi/bug

Bugzilla version: 3.6.8


Actual results:

Internal server error (Catalyst crash)

From bzapi.log:

Caught exception in Bugzilla::API::Controller::Bug->bug "Can't use string ("HTTP::Message content must be by"...) as a HASH ref while "strict refs" in use at /var/www/bzapi/script/../lib/Bugzilla/API/Model/Utils.pm line 686, <> line 2."


Expected results:

Response code 201
Do any of the parts of the message which you have elided contain non-ASCII characters? If so, which parts?

Gerv
Looking at the json request I have some encoded chars in the string: \uf04a and \uf04c
Have you applied the BZ::Client patch as mentioned in the last line here:
https://wiki.mozilla.org/Bugzilla:REST_API#Required_Extension_and.2For_Patch.28es.29
?

These symptoms are consistent with not having applied it...

Gerv
Hi all,
I have the same problem. BZ:: client instaled 1.03. I tried to post a defect via bzapi. With attachments. 
Without attachments defect posted properly. With attachments i get somthing like this:
We post defect with attachment in next two step:
1. post simple defect
2. update defect with attachments.  
Actual results: Defect posted properly. second step - updating defect with attachment doesn't work. Would some one help me please? you can see log below. 

Thanks in advance!
BTW. bzapi logs doesn't show any error and any actions regarding step with attachments. 

Logs from our program:
""""
20-Sep-2012 06:26:24:233 Error       General  |WebException. Error in reponse: Method POST not implemented for http://172.23.56.228/latest/bug/one_bug	
20-Sep-2012 06:26:24:682 Error       General    |The remote server returned an error: (405) Method Not Allowed
"""

Logs from apache access.log
"""
172.23.56.65 - - [20/Sep/2012:18:55:07 +0300] "POST /latest//bug?username=sa@sa.com&password=Password HTTP/1.1" 201 368 "-" "-"
172.23.56.228 - - [20/Sep/2012:18:55:07 +0300] "POST /bugzilla/xmlrpc.cgi/xmlrpc.cgi HTTP/1.1" 200 405 "-" "BZ::Client::XMLRPC 1"
172.23.56.65 - - [20/Sep/2012:18:55:09 +0300] "POST /latest//bug//11//attachment?username=sa@sprinter.com&password=Password HTTP/1.1" 405 281 "-" "-"
"""
anatoliy: If you need help using BzAPI, head over to:
https://www.mozilla.org/about/forums/#tools

If you have a definite bug in BzAPI, please file a new bug rather than co-opting this one. Thank you :-)

Gerv
(In reply to Gervase Markham [:gerv] from comment #5)
> anatoliy: If you need help using BzAPI, head over to:
> https://www.mozilla.org/about/forums/#tools
> 
> If you have a definite bug in BzAPI, please file a new bug rather than
> co-opting this one. Thank you :-)
> 
> Gerv

Thanks Gerv!
Resolving INCOMPLETE due to lack of response from original reporter regarding BZ::Client patch.

Gerv
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.