Bug 222097 - [PATCH]www/phpvirtualbox 5.1.1: SOAP Validation constraint violation
Summary: [PATCH]www/phpvirtualbox 5.1.1: SOAP Validation constraint violation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-09-06 10:33 UTC by Ivan Rozhuk
Modified: 2017-09-08 02:28 UTC (History)
5 users (show)

See Also:


Attachments
0001-bug-fix.patch reworked (8.53 KB, patch)
2017-09-06 10:33 UTC, Ivan Rozhuk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2017-09-06 10:33:23 UTC
Created attachment 186113 [details]
0001-bug-fix.patch reworked

From: https://bugs.archlinux.org/task/55228
VM config can't be edited.
New VM can't be created.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-09-06 11:28:42 UTC
A commit references this bug:

Author: decke
Date: Wed Sep  6 11:28:28 UTC 2017
New revision: 449338
URL: https://svnweb.freebsd.org/changeset/ports/449338

Log:
  Fix SOAP Validation constraint violation with newer VirtualBox 5.1.26

  PR:		222097
  Submitted by:	rozhuk.im@gmail.com
  Obtained from:	Thomas Pochetat <poteuch@hotmail.com>
  See:		https://bugs.archlinux.org/task/55228

Changes:
  head/www/phpvirtualbox/Makefile
  head/www/phpvirtualbox/files/patch-endpoints_lib_vboxconnector.php
Comment 2 Bernhard Froehlich freebsd_committer freebsd_triage 2017-09-06 11:30:27 UTC
Committed. Thanks!

I've modified the patch a bit to closer follow existing coding style (whitespace changes only) which removed a few hunks of the patch.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2017-09-06 12:57:35 UTC
Thanks a lot!
Found it month ago, but no time for explore and make correct report.
Comment 4 Derek Schrock 2017-09-08 02:12:33 UTC
I think your takeSnapshot() change is still broken.  The null should be false.  Can you take snapshots with this patch?

Also, see https://gist.github.com/derekschrock/f7c4ee9b1d3533088baa1e44ebc624c8 with the patch I've been working with over the past month.  This approach is a little different by checking in the method for nulls instead of correcting the call itself.  Each fix has pros/cons.

There might be a couple other calls that are still passing nulls (temporaryEjectDevice, nonRotationalDevice, setHotPluggableForDevice were other functions in backtraces I ran into.) I believe you'll run in to these issues when you're adding/changing controllers, adding/removing disks, or playing around in the VMM disk manager.

Also, see line vboxconnector.php:2522 I haven't fully traced that back to see if $args['class'] issues a SOAP call or not.
Comment 5 Ivan Rozhuk 2017-09-08 02:28:40 UTC
Before I found patch I was thinking about add checks for all args, like:

check_arg($arg) {
    return (($arg === null) ? "Null" : $arg);
}

...
        $request->accessMode = check_arg($arg_accessMode);
        $request->forceNewUuid = check_arg($arg_forceNewUuid);
...

wsdl accept "Null" for many/all args.
IMHO before php7 if $arg = null then may be it was converted to "Null" and all works.