Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imposible delete bid #360

Closed
avs-code opened this issue Aug 11, 2019 · 16 comments
Closed

Imposible delete bid #360

avs-code opened this issue Aug 11, 2019 · 16 comments

Comments

@avs-code
Copy link
Contributor

avs-code commented Aug 11, 2019

Describe the bug

save bid response 
Object { data: {…}, status: 201, statusText: "Created", headers: {…}, config: {…}, request: XMLHttpRequest }
flights:285:21
successfully saved flight flights:292:25
Request from another blocked source: the same source policy prevents reading the remote resource in https://argavirtual.com/403.shtml (reason: the header CORS 'Access-Control-Allow-Origin' does not match with 'https://argavirtual.com').

Cross-origin request blocked: The same origin policy does not allow the reading of remote resources in https://argavirtual.com/403.shtml. (Reason: CORS request without success).

Error saving bid status 
Object { url: "http://argavirtual.com/phpvms7/api/user/bids", data: {…}, method: "DELETE" }
 Error: "Network Error"
    createError createError.js:16
    handleError xhr.js:87
flights:298:21
    <anonymous> http://argavirtual.com/phpvms7/flights:298

Version
version 7.0.0 (build 190808.47be75)

To Reproduce
See video
https://media.giphy.com/media/JpvpAYab6sQ0GQdMBz/giphy.mp4
https://giphy.com/gifs/JpvpAYab6sQ0GQdMBz/fullscreen

Expected behavior
Delete a bin in page interface when you do click in icon.

Screenshots
See video above

Additional context
Add any other context and attach logs (from storage/logs/laravel-<date>.log)
No errors in log file.

@nabeelio
Copy link
Owner

I'm not seeing this locally. What is the webserver you're using?

@nabeelio
Copy link
Owner

Looks like the request is coming from http://argavirtual.com/phpvms7/api/user/bids, and going from http to https... can you try loading the site from https and try again?

@avs-code
Copy link
Contributor Author

I enter again, this time checking the https in url and it still there all time.
I got this error on firefox console:

Error saving bid status
{…}
​
data: {…}
​​
flight_id: "b8232EEQl53e"
​​
<prototype>: Object { … }
​
method: "DELETE"
​
url: "https://argavirtual.com/phpvms7/api/user/bids"
​
<prototype>: {…}
​​
__defineGetter__: function __defineGetter__()
​​
__defineSetter__: function __defineSetter__()
​​
__lookupGetter__: function __lookupGetter__()
​​
__lookupSetter__: function __lookupSetter__()
​​
__proto__: 
​​
constructor: function Object()
​​
hasOwnProperty: function hasOwnProperty()
​​
isPrototypeOf: function isPrototypeOf()
​​
propertyIsEnumerable: function propertyIsEnumerable()
​​
toLocaleString: function toLocaleString()
​​
toSource: function toSource()
​​
toString: function toString()
​​
valueOf: function valueOf()
​​
<get __proto__()>: function __proto__()
​​
<set __proto__()>: function __proto__()
 Error: "Request failed with status code 403"
    createError createError.js:16
    settle settle.js:18
    handleLoad xhr.js:77
flights:298:21
    <anonymous> https://argavirtual.com/phpvms7/flights:298

I checked:
File config.php

return [

    // Overrides config/app.php
    'app' => [
        'name' => 'phpvms7.0.0+190826.25999d',
        'url'  => 'https://argavirtual.com/phpvms7',

app.php

return [
    'name'    => env('APP_NAME', 'phpvms'),
    'env'     => env('APP_ENV', 'dev'),
    'debug'   => env('APP_DEBUG', true),
    'url'     => env('APP_URL', 'http://localhost'),
    'version' => '7.0.0',

Change APP_URL', 'http://localhost to https didn't make a difference.

After I gone to admin and firefox console show this:

Source mapping error: request failed with status 404
Resource URL: https://argavirtual.com/phpvms7/public/assets/admin/js/vendor.js
Source map URL: popper-utils.js.map

The admin option Expire Time
Number of hours to expire bids after 24
That doesn't seem to work, since the bid should be removed after 24 hours, right?

laravel-2019-08-26.log

@nabeelio
Copy link
Owner

Maybe make a separate bug for the bid not being automatically removed. What's the URL you're going to when you're trying to remove the bid?

@avs-code
Copy link
Contributor Author

avs-code commented Aug 26, 2019

https://argavirtual.com/phpvms7/flights or https://argavirtual.com/phpvms7/flights/bids

It catches my attention that being in https if I press the phpvms logo it takes me to http://argavirtual.com/phpvms7/

P.S: If I'm a normal user still redirecting me to http all time, and I can't access to https://argavirtual.com/phpvms7/flights or without https don't matter, I can't access, neither to pireps, profile or downloads.

I can create a ftp user and db user for you if you want.

@nabeelio
Copy link
Owner

In the admin panel, are you able to use the airport lookup?

@nabeelio
Copy link
Owner

Going to http from https sounds like maybe there's a apache or nginx config that's conflicting, esp if the config has https. But I just noticed something on the page itself that might be missing... I should have a branch for you to look at shortly

@nabeelio
Copy link
Owner

Try this branch: 360-Axios-Base-URL

@nabeelio nabeelio changed the title Imposible delete bin Imposible delete bid Aug 27, 2019
@avs-code
Copy link
Contributor Author

In the admin panel, are you able to use the airport lookup?

Yes, airport lookup in "add new" airport is working

@avs-code
Copy link
Contributor Author

Try this branch: 360-Axios-Base-URL

thanks, when I'm home at 20-GMT I will try.

@nabeelio
Copy link
Owner

Yes, airport lookup in "add new" airport is working

Interesting, ok. Maybe it's the DELETE method. Let me look at that

@avs-code
Copy link
Contributor Author

avs-code commented Aug 27, 2019

Hi, the page it isn't loading, I saw a error file in home directory
error_log

[27-Aug-2019 18:03:24 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:24 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:27 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:27 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:46 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:46 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:49 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:49 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:59 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:03:59 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:04:02 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:04:02 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:00 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:00 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:02 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:02 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:34 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:34 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:36 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:05:36 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:08:20 UTC] PHP Warning:  require(/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17
[27-Aug-2019 18:08:20 UTC] PHP Fatal error:  require(): Failed opening required '/home/argavirt/public_html/phpvms7/bootstrap/../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/argavirt/public_html/phpvms7/bootstrap/autoload.php on line 17

P.S: I downloaded zip from https://github.com/nabeelio/phpvms/tree/360-Axios-Base-URL

@nabeelio
Copy link
Owner

nabeelio commented Aug 27, 2019 via email

@avs-code
Copy link
Contributor Author

Firefox console:

baseURL=https://argavirtual.com/phpvms7 bootstrap.js:24:10
Error: Request failed with status code 404 app.js:16:15

No errors in log

nabeelio added a commit that referenced this issue Aug 29, 2019
@nabeelio
Copy link
Owner

Try downloading the latest dev branch, and then extract the files from the 360-Axios-Base-URL over it and give it a shot. I made a new more changes.

@avs-code
Copy link
Contributor Author

avs-code commented Aug 29, 2019

It's working. No errors in firefox console.
I left you here the log because if you need see something.

Thanks!

laravel-2019-08-29.log

nabeelio added a commit that referenced this issue Aug 30, 2019
* Refactor all JS API calls #360

* Remove unused imports

* Lint JS

* Fix doubled api key

* Formatting

* Added extra logging to distance lookup

* Remove the .editorconfig file in distrib

* shell check fixes

* Remove the .editorconfig file in distrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants