paulproteus / ampache-sandstorm-prototype

Create an initial packaging prototype of Ampache on Sandstorm
1 stars 0 forks source link

Ampache runs successfully on XAMPP, but blank on Sandstorm #21

Open vionemc opened 7 years ago

vionemc commented 7 years ago

This is Ampache when run on XAMPP:

layar_penuh_080916_013000_am

vagrant-spk dev can compile just okay, but there is something wrong. I can create an instance successfully but instead of showing Ampache, it shows blank. It says loading 15MB which should be right, and the log shows no error.

layar_penuh_080916_013412_am

The log:

...** SANDSTORM SUPERVISOR: Starting up grain.
Installing MySQL system tables...
160808 18:32:42 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160808 18:32:42 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 29 ...
OK
Filling help tables...
160808 18:32:43 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160808 18:32:43 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 35 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h sandbox password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

waiting for mysql to be available at /var/run/mysqld/mysqld.sock
160808 18:32:43 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160808 18:32:43 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 39 ...
waiting for mysql to be available at /var/run/mysqld/mysqld.sock
waiting for mysql to be available at /var/run/mysqld/mysqld.sock
waiting for mysql to be available at /var/run/mysqld/mysqld.sock
waiting for mysql to be available at /var/run/mysqld/mysqld.sock
waiting for mysql to be available at /var/run/mysqld/mysqld.sock
waiting for mysql to be available at /var/run/mysqld/mysqld.sock
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.

@paulproteus do you know anything about this? There are not enough trace of Q&A of Sandstorm in the internet yet.

vionemc commented 7 years ago

This is what's inside sandstorm.log

vagrant@localhost:~$ tail /opt/sandstorm/var/log/sandstorm.log
Migrations already applied: 29/30
Applying migration 30
Applied migration 30
Downloading app: https://app-index.sandstorm.io/packages/8a2795a116178e825cc232b2c8e30520
App ready: 8a2795a116178e825cc232b2c8e30520
fetching keybase B86C836B17E856566A206C069AA232D6F1C7C38E
fetching keybase B86C836B17E856566A206C069AA232D6F1C7C38E
** Accepted new dev session connection...
** Accepted new dev session connection...
** Accepted new dev session connection...
paulproteus commented 7 years ago

Might be this

A blank white screen renders where the app should be

This can happen when a Sandstorm app in development doesn't know its correct base URL and serves a HTTP redirect away from the Sandstorm server. Sandstorm blocks that redirect, resulting in a white grain frame.

To find out if you're running into this issue, open the Javascript console in your browser and look for a Content-Security-Policy violation. If you see a message about navigation being blocked, then very likely you are seeing this error.

If possible, configure the app to use a base URL of '', literally the empty string. Then it will send HTTP redirects without specifying a base URL. If that isn't possible, Sandstorm apps should look at the Host: header for a base URL.

​source: https://docs.sandstorm.io/en/latest/developing/troubleshooting/

vionemc commented 7 years ago

For more details, this is from my Chrome console:

Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

f9af03b….js?meteor_js_resource=true:197 App authors: To understand the grain-frame in Sandstorm and how to find logs and perform troubleshooting, see:

When debugging, make sure you execute Javascript in the context of the 'grain-frame' IFRAME. References:

We can also provide personal assistance! Get in touch: https://sandstorm.io/community core.js:271 undefined :6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/apps:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

6tabs.js:295 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. AdSYXjXZteiMxGmPPQkRFC:1 Refused to frame 'http://localhost:8000/PHP%20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

f9af03b….js?meteor_js_resource=true:198 openSession error n(anonymous function) @ f9af03b….js?meteor_js_resource=true:198 f9af03b….js?meteor_js_resource=true:198 openSession error n(anonymous function) @ f9af03b….js?meteor_js_resource=true:198 AdSYXjXZteiMxGmPPQkRFC/:1 Refused to frame 'http://localhost:8000/PHP%20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

2kcE9MyFJKiXziQizz3ZKuY:1 Refused to frame 'http://localhost:8000/PHP%20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

f9af03b….js?meteor_js_resource=true:198 openSession error n(anonymous function) @ f9af03b….js?meteor_js_resource=true:198 kcE9MyFJKiXziQizz3ZKuY:1 Refused to frame 'http://localhost:8000/PHP%20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

g6CeowXmFw856pqhwrtbqe:1 Refused to frame 'http://localhost:8000/PHP%20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to frame 'http://localhost:8000/PHP%20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

cYWDHkNZAhe4TTbwZTMok2:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

paulproteus commented 7 years ago

This one line is the important one:

AdSYXjXZteiMxGmPPQkRFC:1 Refused to frame 'http://localhost:8000/PHP% 20projects/Asheesh%20Laroia/ampache-sandstorm-prototype/login.php' because it violates the following Content Security Policy directive: "frame-src 'self' http://*.local.sandstorm.io:6080".

It seems that Ampache is configured to believe its base URL is localhost:8000

Per https://docs.sandstorm.io/en/latest/developing/path/ , that won't work within Sandstorm. It needs to auto-detect its base URL. Often, this can be fixed in the nginx configuration, but sometimes it requires editing PHP code.

If you need help finding sample PHP code that does this, let me know.

vionemc commented 7 years ago

Yup, you are right. I needed a different base URL for XAMPP and it causes this error when uploading the app. That one is solved but now I got Content-Security-Policy. I need to set the Host: header to blank and currently looking for a way to do so.

paulproteus commented 7 years ago

If it's hard to set it to blank, perhaps you can set it to the appropriate base URL within the config file.

Is the base URL stored in a config file, and if so, is that config file PHP? If so, then you can use:

$_SERVER["HTTP_X_SANDSTORM_BASE_PATH"]

which will calculate it uniquely with every request.

vionemc commented 7 years ago

After applying $_SERVER["HTTP_X_SANDSTORM_BASE_PATH"] = "" I got this error:

2016/08/08 19:14:38 [error] 67#0: *2 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to a member function quote() on null in /opt/app/lib/class/dba.class.php on line 134" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "45f23cf8683603b76ac5e01a9177464f.local.sandstorm.io:6080"

paulproteus commented 7 years ago

I don't recommend modifying $_SERVER["HTTP_X_SANDSTORM_BASE_PATH"] by setting it to "". I suggest undoing that change. :)

Maybe a better question is:

Did you hard-code localhost:8000 somewhere? For example, in the nginx configuration? Or in a Ampache configuration file? Let me know specifically where you wrote it, if anywhere, so we can figure the best thing to do given the context.

vionemc commented 7 years ago

Ahhh, okay, I'll check. Most of the default value is localhost:8000

paulproteus commented 7 years ago

Cool. Do let me know, rather than just guess, for this one; it's pretty subtle.

For what it's worth - if you're using a config file generated by Ampache while Ampache was running outside Sandstorm, I recommend instead generating a fresh one when running Ampache inside Sandstorm.

vionemc commented 7 years ago

I found port 8000 in the Nginx config file. Changing the port to 6080 or blank didn't solve the problem. This is the Nginx config file:

worker_processes 4;
pid /var/run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {
    # Basic Settings
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_names_hash_bucket_size 64;
    server_tokens off;
    server_name_in_redirect off;

    include mime.types;
    default_type application/octet-stream;

    # Logging
    access_log off;
    error_log stderr;

    # Prevent nginx from adding compression; this interacts badly with Sandstorm
    # WebSession due to https://github.com/sandstorm-io/sandstorm/issues/289
    gzip off;

    # Trust the sandstorm-http-bridge's X-Forwarded-Proto.
    map $http_x_forwarded_proto $fe_https {
        default "";
        https on;
    }

    server {
        #listen 8000 default_server;
        #listen [::]:8000 default_server ipv6only=on;
        listen  default_server;
        listen [::]: default_server ipv6only=on;

        # Allow arbitrarily large bodies - Sandstorm can handle them, and requests
        # are authenticated already, so there's no reason for apps to add additional
        # limits by default.
        client_max_body_size 0;

        server_name localhost;
        root /opt/app;
        location / {
            index index.php;
            try_files $uri $uri/ =404;
        }
        location ~ \.php$ {
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param  QUERY_STRING       $query_string;
            fastcgi_param  REQUEST_METHOD     $request_method;
            fastcgi_param  CONTENT_TYPE       $content_type;
            fastcgi_param  CONTENT_LENGTH     $content_length;

            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
            fastcgi_param  REQUEST_URI        $request_uri;
            fastcgi_param  DOCUMENT_URI       $document_uri;
            fastcgi_param  DOCUMENT_ROOT      $document_root;
            fastcgi_param  SERVER_PROTOCOL    $server_protocol;
            fastcgi_param  HTTPS              $fe_https if_not_empty;

            fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
            fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

            fastcgi_param  REMOTE_ADDR        $remote_addr;
            fastcgi_param  REMOTE_PORT        $remote_port;
            fastcgi_param  SERVER_ADDR        $server_addr;
            fastcgi_param  SERVER_PORT        $server_port;
            fastcgi_param  SERVER_NAME        $server_name;

            # PHP only, required if PHP was built with --enable-force-cgi-redirect
            fastcgi_param  REDIRECT_STATUS    200;
        }
    }
}
paulproteus commented 7 years ago

Yeah - I wouldn't recommend changing the port number here in the nginx config.

Are you using an Ampache config file that was generated from non-Sandstorm Ampache? Or generating a new one by running Ampache within Sandstorm?

vionemc commented 7 years ago

I create one on my own based on the sample.

So, it will be generated on its own when we run vagrant-spk dev?

paulproteus commented 7 years ago

I believe that if you leave the config file out, Ampache will run its configuration wizard, which will result in a config file you can download and then put into the app folder. Maybe you can try omitting the config file and seeing if Ampache launches it configuration wizard.

vionemc commented 7 years ago

The error in javascript console goes away, but the instance fall into an endless loading.

paulproteus commented 7 years ago

Hmm. Did you restore the nginx config to the values generated by vagrant-spk setupvm lemp? If not, please make sure you did that.

vionemc commented 7 years ago

Yup, I already restore it. And now the content security violation error shows up again.

paulproteus commented 7 years ago

Can you paste the full new error here?

vionemc commented 7 years ago

Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/a5jQeYARs4cXmuX8MhRM9C:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/a5jQeYARs4cXmuX8MhRM9C:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/a5jQeYARs4cXmuX8MhRM9C:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/a5jQeYARs4cXmuX8MhRM9C:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/a5jQeYARs4cXmuX8MhRM9C:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/a5jQeYARs4cXmuX8MhRM9C:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

http://f1e014ef2372b529f7f1e0fe7ee86cc9.local.sandstorm.io:6080/ Failed to load resource: the server responded with a status of 500 (Grain's package not installed) f9af03b….js?meteor_js_resource=true:198 openSession error n(anonymous function) @ f9af03b….js?meteor_js_resource=true:198 f9af03b….js?meteor_js_resource=true:198 openSession error n(anonymous function) @ f9af03b….js?meteor_js_resource=true:198 prevent.user.js:52 [{"code":16,"status":false},{"code":17,"status":true}] 2prevent.user.js:52 [{"code":16,"status":true},{"code":17,"status":true}] :6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

:6080/grain/89zgLxc3padyKoWKhjbBnT:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

prevent.user.js:52 [{"code":16,"status":false},{"code":17,"status":true}] 2prevent.user.js:52 [{"code":16,"status":true},{"code":17,"status":true}] local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

local.sandstorm.io/:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

vionemc commented 7 years ago

There is no Ampache config file generated. At which point does it generated?

vagrant@localhost:/opt/app/config$ ls
ampache.cfg.php.dist  motd.php.dist  registration_agreement.php.dist
paulproteus commented 7 years ago

w/r/t generating the config file:

Per https://github.com/ampache/ampache/wiki/Installation , Ampache will show you a user-facing wizard interface, the result of which is Ampache generating a config file.

w/r/t JS console: Can you clear the JS console, and do a fresh page load, and find any error that contains the string: "Refused to frame" and paste just that/those lines?

It's "Refused to frame" that is the important issue usually.

vionemc commented 7 years ago

There is no "Refused to frame" now.

I didn't go through the proper installation somehow. I don't know why. I just went through the proper installation but still got through this bug.

paulproteus commented 7 years ago

I'm not sure I understand - do you still have the problem? Or did it go away?

vionemc commented 7 years ago

I still do. The automatically generated config set the base path to a base path suitable for XAMPP instead of Vagrant.

paulproteus commented 7 years ago

Got it. Is it trying to take you to /login.php?

If so, for now I suggest you manually navigate to /login.php by adding it to the grain URL in the address bar, e.g.

http://local.sandstorm.io:6080/grain/{{grainId}}/login.php

and proceed manually for now.

We'll have to fix up the index.php redirect problem at some point, it's true.

paulproteus commented 7 years ago

Here's some info on the index.php redirect problem:

When you see these redirect errors, you can search the codebase for Location: (including the final colon)

When I do that here:

https://github.com/paulproteus/ampache-sandstorm-prototype/search?utf8=%E2%9C%93&q=Location%3A&type=Code

I see that, internally, Ampache uses this expression:

AmpConfig::get('web_path')

on (for example) this line:

https://github.com/paulproteus/ampache-sandstorm-prototype/blob/862df32ba5226196f835c2301551529f4bd85c07/shout.php#L55

to calculate the base URL.

You'll need to change Ampache's code so that it returns either the empty string (recommended) or $_SERVER["HTTP_X_SANDSTORM_BASE_PATH"] (also OK) as the return value for AmpConfig::get('web_path').

I hope that helps! Let me know if you need more info.

vionemc commented 7 years ago

http://local.sandstorm.io:6080/grain/`{{grainId}}`/login.php doesn't solve the problem. I still get Content Security Violation.

web_path = $_SERVER["HTTP_X_SANDSTORM_BASE_PATH"] also doesn't solve the problem.

paulproteus commented 7 years ago

Can you make sure to:

Cheers,

Asheesh.

vionemc commented 7 years ago

This is the full log after doing all of the steps you requested:

Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

f9af03b….js?meteor_js_resource=true:197 App authors: To understand the grain-frame in Sandstorm and how to find logs and perform troubleshooting, see:

When debugging, make sure you execute Javascript in the context of the 'grain-frame' IFRAME. References:

We can also provide personal assistance! Get in touch: https://sandstorm.io/community core.js:271 undefined login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAJd6ABIAAAABdegAAAAAAACWIAAAAVoAAAKDAAAAA…SYUnjpYfcSDw49uhYFPVe8dHZcYGS7Cfk4MMJ7zwjznvGw3PMA2Oo6+tf/wpSdPlSR/ADe7uPx' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAKD5ABIAAAABjrQAAAAAAACfoAAAAVkAAAKCAAAAA…mFlx52L/Hg0KNrUdBzxUtnxwVGtpuQjwMjvPeMMO8ZD8s9D4CtrqN//S9M2ek/FckP9vfjlA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAA…CwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI3gABIAAAABRWQAAQABAAAAAAAAAAAAAAAAAAAAA…IwnaGGIYHBlUELLMKwH6htK8MUhmKGIAYjqCImVEUgs1mBOtm1gRYpuNZmSrgAALqcEVgAAAA=' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAI7kABEAAAABPbQAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAEzMABMAAAAAezAAAQAAAAAAAAAAAAAAAAAAAAAAA…1qIN4ujgYGRhaHjuSQCJCSSCAAGifAwcSjtYPxf+sGlt6NTECdrCkuALy2JpcAAVT4eScAAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

login.php:1 Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAIw4ABEAAAABQcAAAQABAAAAAAAAAAAAAAAAAAAAA…hgZiCKVViwAiVhsAFFYyNisAIjRLMJCgMCK7MLEAMCK7MRFgMCK1myBCgGRVJEswsQBAIrAA==' because it violates the following Content Security Policy directive: "font-src 'self' http://static.local.sandstorm.io:6080".

paulproteus commented 7 years ago

Interesting. No "Refused to frame" error! Maybe that means that the nginx error log (which is available by clicking the terminal icon within Sandstorm) is the place to look for more info.

vionemc commented 7 years ago

Do you mean this?

...\ SANDSTORM SUPERVISOR: Starting up grain. Installing MySQL system tables... 160808 20:39:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160808 20:39:38 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 30 ... OK Filling help tables... 160808 20:39:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160808 20:39:38 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 36 ... OK

To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h sandbox password 'new-password'

Alternatively you can run: /usr/bin/mysql_secure_installation

which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

waiting for mysql to be available at /var/run/mysqld/mysqld.sock 160808 20:39:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160808 20:39:38 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 40 ... waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock * SANDSTORM SUPERVISOR: Grain shutdown requested. * SANDSTORM SUPERVISOR: Starting up grain. Installing MySQL system tables... 160808 20:39:58 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160808 20:39:58 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 28 ... OK Filling help tables... 160808 20:39:58 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160808 20:39:58 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 34 ... OK

To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h sandbox password 'new-password'

Alternatively you can run: /usr/bin/mysql_secure_installation

which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

waiting for mysql to be available at /var/run/mysqld/mysqld.sock 160808 20:39:58 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160808 20:39:58 [Note] /usr/sbin/mysqld (mysqld 5.5.50-0+deb8u1) starting as process 38 ... waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock waiting for mysql to be available at /var/run/mysqld/mysqld.sock * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. * SANDSTORM SUPERVISOR: Grain still in use; staying up for now. \ SANDSTORM SUPERVISOR: Grain still in use; staying up for now.

paulproteus commented 7 years ago

Yes! Hmm. No useful info there, either.

paulproteus commented 7 years ago

Oh - another thing you can do is replace all references to "Location:" . AmpConfig::get('web_path') . with "Location:" . , thereby removing all the calls to AmpConfig::get('web_path'), thereby basically treating it as returning the empty string.

paulproteus commented 7 years ago

This strategy only helps avoid Refused to frame errors, for what it's worth.

vionemc commented 7 years ago

But that strategy is the same with setting web_path to "", don't you think so?

paulproteus commented 7 years ago

The nice thing about modifying just the areas of the code that send Location: headers to the client is that we can know the impact of our change on the codebase, I figure. We can even decide to be very minimal and only modify the redirects that seem to be bothersome.

vionemc commented 7 years ago

I've tried to comment all of those headers, but well Refused to frame error is not showing up since a long time ago anyway. The other issues still persist.

paulproteus commented 7 years ago

Interesting. Can you submit a PR with the current status of your .sandstorm/ and any code changes you've made? I can schedule time today or tomorrow to test them and see if I can understand the problem.

vionemc commented 7 years ago

OK! Please wait

vionemc commented 7 years ago

@paulproteus It has been a while. I hope everything is okay. Can I do anything to help?