powerman / perl-Mojolicious-Plugin-SecureCORS

Perl module: Mojolicious::Plugin::SecureCORS - Complete control over CORS
https://metacpan.org/release/Mojolicious-Plugin-SecureCORS
Other
0 stars 4 forks source link

Can no longer install 2.0.1 #3

Closed rwillett closed 6 years ago

rwillett commented 6 years ago

We've spent most of the weekend trying to get SecureCors to install and its failed every time.

We've tried installing it on

  1. Ubuntu 14.04 under OpenVZ as thats what our hosting agent uses.
  2. Ubuntu 16.04 under OpenVZ as thats what our hosting agent uses.
  3. Ubuntu 16.04 under EXSI internally.

Every time try to install we get the samer error. See below.

Now what puzzles is is that we have installed this (or think we have) many times and we can see it installed on an OpenVZ server running Ubuntu 16.04. It's actually part of a script we use to build a server so we haven't noticed any issues.

We keep going back to the servers, installing the OS, updating them and trying but no joy.

Any suggestions welcomed.

Thanks

Rob


root@demo2:~# cpanm Mojolicious::Plugin::SecureCORS
--> Working on Mojolicious::Plugin::SecureCORS
Fetching http://www.cpan.org/authors/id/P/PO/POWERMAN/Mojolicious-Plugin-SecureCORS-v2.0.1.tar.gz ... OK
Configuring Mojolicious-Plugin-SecureCORS-v2.0.1 ... OK
Building and testing Mojolicious-Plugin-SecureCORS-v2.0.1 ... FAIL
! Installing Mojolicious::Plugin::SecureCORS failed. See /root/.cpanm/work/1534691851.20108/build.log for details. Retry with --force to force install it.
root@demo2:~# cat /root/.cpanm/work/1534691851.20108/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.018002 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1534691851.20108
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Mojolicious::Plugin::SecureCORS () on cpanmetadb ...
--> Working on Mojolicious::Plugin::SecureCORS
Fetching http://www.cpan.org/authors/id/P/PO/POWERMAN/Mojolicious-Plugin-SecureCORS-v2.0.1.tar.gz
-> OK
Unpacking Mojolicious-Plugin-SecureCORS-v2.0.1.tar.gz
Entering Mojolicious-Plugin-SecureCORS-v2.0.1
Checking configure dependencies from META.json
Checking if you have Module::Build::Tiny 0.034 ... Yes (0.039)
Configuring Mojolicious-Plugin-SecureCORS-v2.0.1
Running Build.PL
Creating new 'Build' script for 'Mojolicious-Plugin-SecureCORS' version 'v2.0.1'
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have List::MoreUtils 0.34 ... Yes (0.428)
Checking if you have Mojolicious::Lite 0 ... Yes (undef)
Checking if you have Mojolicious 6 ... Yes (7.93)
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have Mojo::Base 0 ... Yes (undef)
Checking if you have Test::Mojo 0 ... Yes (undef)
Building and testing Mojolicious-Plugin-SecureCORS-v2.0.1
cp lib/Mojolicious/Plugin/SecureCORS.pm blib/lib/Mojolicious/Plugin/SecureCORS.pm
# Testing Mojolicious::Plugin::SecureCORS v2.0.1, Perl 5.018002, /usr/bin/perl
t/00.load.t ............... ok
t/01.export.t ............. skipped: This module doesn't export anything
t/author-perlcritic.t ..... skipped: these tests are for testing by the author
t/author-pod-syntax.t ..... skipped: these tests are for testing by the author

#   Failed test '204 No Content'
#   at t/basic.t line 61.
#          got: '404'
#     expected: '204'

#   Failed test '204 No Content'
#   at t/basic.t line 64.
#          got: '404'
#     expected: '204'

#   Failed test '204 No Content'
#   at t/basic.t line 67.
#          got: '404'
#     expected: '204'

#   Failed test 'Access-Control-Allow-Origin: http://ya.local'
#   at t/basic.t line 70.
#          got: undef
#     expected: 'http://ya.local'

#   Failed test '204 No Content'
#   at t/basic.t line 70.
#          got: '404'
#     expected: '204'

#   Failed test '204 No Content'
#   at t/basic.t line 73.
#          got: '404'
#     expected: '204'

#   Failed test '204 No Content'
#   at t/basic.t line 77.
#          got: '404'
#     expected: '204'

#   Failed test 'Access-Control-Allow-Origin: http://ya.local'
#   at t/basic.t line 84.
#          got: undef
#     expected: 'http://ya.local'

#   Failed test 'Access-Control-Allow-Methods: PUT'
#   at t/basic.t line 84.
#          got: undef
#     expected: 'PUT'

#   Failed test 'Access-Control-Allow-Headers: X-Requested-With'
#   at t/basic.t line 84.
#          got: undef
#     expected: 'X-Requested-With'

#   Failed test 'Access-Control-Allow-Credentials: true'
#   at t/basic.t line 84.
#          got: undef
#     expected: 'true'

#   Failed test '204 No Content'
#   at t/basic.t line 84.
#          got: '404'
#     expected: '204'

#   Failed test '204 No Content'
#   at t/basic.t line 94.
#          got: '404'
#     expected: '204'
# Looks like you failed 13 tests of 86.
t/basic.t .................
Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 13/86 subtests
t/release-distribution.t .. skipped: these tests are for release candidate testing

Test Summary Report
-------------------
t/basic.t               (Wstat: 3328 Tests: 86 Failed: 13)
  Failed tests:  27, 30, 33, 35-36, 39, 42, 44-48, 51
  Non-zero exit status: 13
Files=6, Tests=87,  1 wallclock secs ( 0.04 usr  0.02 sys +  0.70 cusr  0.17 csys =  0.93 CPU)
Result: FAIL
-> FAIL Installing Mojolicious::Plugin::SecureCORS failed. See /root/.cpanm/work/1534691851.20108/build.log for details. Retry with --force to force install it.
powerman commented 6 years ago

Looks like this happens because of some incompatible change in Mojolicious. Tests works ok with Mojoliicous@7.72, but fail with latest Mojolicious@7.93.

powerman commented 6 years ago

Test was broken by Mojolicious@7.88 but I didn't see anything related in Mojolicious ChangeLog which may break these tests.

rwillett commented 6 years ago

Thank you for the prompt reply. I can probably go back to 7.85. It's all scripted now...

This is a working version on another box.

It works on CORE
  Perl        (v5.22.1, linux)
  Mojolicious (7.85, Doughnut)

OPTIONAL
  EV 4.0+                 (n/a)
  IO::Socket::Socks 0.64+ (n/a)
  IO::Socket::SSL 2.009+  (2.056)
  Net::DNS::Native 0.15+  (n/a)
  Role::Tiny 2.000001+    (2.000006)

Do you want me to check it on 7.85?

Rob

powerman commented 6 years ago

Fixed in 2.0.2, thanks for the report!

rwillett commented 6 years ago

Wow, that was fast. Do I download from Git or from CPAN?

powerman commented 6 years ago

Do what will works for you. It was uploaded to CPAN, but it take some time (usually - few minutes/hours) before it'll became available for download from CPAN.

rwillett commented 6 years ago

Cheers, will update. We're rebuilding the server as we're errr, borked it :)

rwillett commented 6 years ago

I can confirm that it now installs correctly.

Many thanks for the exceptionally quick response.

Rob

powerman commented 6 years ago

Mojolicious has a policy to break compatibility with ease. Sure, they deprecate things first for next several versions before removal, but versions are releases quickly enough, which means breakage often happens in a couple of months. So, always be careful when upgrading Mojolicious, it may break a lot of things.

rwillett commented 6 years ago

We realised that now, we have a long build system, it's not very complex but we can run it and it does everything for us. We hadn't needed it for a few months and we hadn't tied the versions down well enough.

We will now.

Thanks again,

Rob