What could be causing this heroku crash? error code=H10 - express

I've looked over past posts on this question and many suggest heroku restart, or restarting dynos, or making sure to use var PORT = process.env.PORT || 3000. I have done all of these, but my app still crashes. The app runs using node/express sequelize / auth0.
Does any one have any suggestions? Thanks!
Here are the logs:
2017-09-08T02:11:37.293051+00:00 app[web.1]: at emitOne
(events.js:96:13)
2017-09-08T02:11:37.293052+00:00 app[web.1]: at Socket.emit
(events.js:188:7)
2017-09-08T02:11:37.293053+00:00 app[web.1]: at emitErrorNT
(net.js:1277:8)
2017-09-08T02:11:37.293054+00:00 app[web.1]: at
_combinedTickCallback (internal/process/next_tick.js:80:11)
2017-09-08T02:11:37.293055+00:00 app[web.1]: at
process._tickCallback (internal/process/next_tick.js:104:9)
2017-09-08T02:11:37.364314+00:00 heroku[web.1]: State changed from
starting to crashed
2017-09-08T02:11:37.353673+00:00 heroku[web.1]: Process exited with
status 0
2017-09-08T02:11:49.712881+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=roadie2.herokuapp.com
request_id=79e0bc3a-aa28-44bb-ab80-cfcf4f6cd97d fwd="99.92.51.34"
dyno= connect= service= status=503 bytes= protocol=https
2017-09-08T02:11:50.564503+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=roadie2.herokuapp.com request_id=c72e5077-494c-41f5-8be1-
f0c2c329d080 fwd="99.92.51.34" dyno= connect= service= status=503
bytes= protocol=https
2017-09-08T02:12:24.838901+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=roadie2.herokuapp.com
request_id=ca551858-5372-40c9-abf1-670176b159dc fwd="99.92.51.34"
dyno= connect= service= status=503 bytes= protocol=https
2017-09-08T02:12:25.340624+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=roadie2.herokuapp.com request_id=c37b876d-5a59-40d0-9d59-
9be013c58d94 fwd="99.92.51.34" dyno= connect= service= status=503
bytes= protocol=https
Here is the last part of what results after entering heroku logs --tail
2017-09-08T02:11:27.589912+00:00 heroku[web.1]: State changed from
crashed to starting
2017-09-08T02:11:29.599921+00:00 heroku[web.1]: Starting process with
command `npm start`
2017-09-08T02:11:32.504222+00:00 app[web.1]:
2017-09-08T02:11:32.504242+00:00 app[web.1]: > 15.2#1.0.0 start /app
2017-09-08T02:11:32.504243+00:00 app[web.1]: > node server.js
2017-09-08T02:11:32.504243+00:00 app[web.1]:
2017-09-08T02:11:33.199936+00:00 app[web.1]: Unhandled rejection
SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:3306
2017-09-08T02:11:33.199952+00:00 app[web.1]: at
Handshake._callback
(/app/node_modules/sequelize/lib/dialects/mysql/connection-
manager.js:80:20)
2017-09-08T02:11:33.199953+00:00 app[web.1]: at
Protocol.handleNetworkError
(/app/node_modules/mysql/lib/protocol/Protocol.js:364:14)
2017-09-08T02:11:33.199953+00:00 app[web.1]: at
Connection._handleNetworkError
(/app/node_modules/mysql/lib/Connection.js:428:18)
2017-09-08T02:11:33.199954+00:00 app[web.1]: at emitOne
(events.js:96:13)
2017-09-08T02:11:33.199952+00:00 app[web.1]: at
Handshake.Sequence.end
(/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:86:24)
2017-09-08T02:11:33.199954+00:00 app[web.1]: at Socket.emit
(events.js:188:7)
2017-09-08T02:11:33.199955+00:00 app[web.1]: at emitErrorNT
(net.js:1277:8)
2017-09-08T02:11:33.199956+00:00 app[web.1]: at
_combinedTickCallback (internal/process/next_tick.js:80:11)
2017-09-08T02:11:33.199956+00:00 app[web.1]: at
process._tickCallback (internal/process/next_tick.js:104:9)
2017-09-08T02:11:33.302346+00:00 heroku[web.1]: State changed from
starting to crashed
2017-09-08T02:11:33.305267+00:00 heroku[web.1]: State changed from .
crashed to starting
2017-09-08T02:11:33.286200+00:00 heroku[web.1]: Process exited with .
status 0
2017-09-08T02:11:34.845606+00:00 heroku[web.1]: Starting process with
command `npm start`
2017-09-08T02:11:36.543285+00:00 app[web.1]:
2017-09-08T02:11:36.543298+00:00 app[web.1]: > 15.2#1.0.0 start /app
2017-09-08T02:11:36.543299+00:00 app[web.1]: > node server.js
2017-09-08T02:11:36.543299+00:00 app[web.1]:
2017-09-08T02:11:37.293030+00:00 app[web.1]: Unhandled rejection .
SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:3306
2017-09-08T02:11:37.293048+00:00 app[web.1]: at
Handshake._callback .
(/app/node_modules/sequelize/lib/dialects/mysql/connection-
manager.js:80:20)
2017-09-08T02:11:37.293049+00:00 app[web.1]: at
Handshake.Sequence.end
(/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:86:24)
2017-09-08T02:11:37.293049+00:00 app[web.1]: at .
Protocol.handleNetworkError
(/app/node_modules/mysql/lib/protocol/Protocol.js:364:14)
2017-09-08T02:11:37.293050+00:00 app[web.1]: at
Connection._handleNetworkError
(/app/node_modules/mysql/lib/Connection.js:428:18)
2017-09-08T02:11:37.293051+00:00 app[web.1]: at emitOne
(events.js:96:13)
2017-09-08T02:11:37.293052+00:00 app[web.1]: at Socket.emit
(events.js:188:7)
2017-09-08T02:11:37.293053+00:00 app[web.1]: at emitErrorNT
(net.js:1277:8)
2017-09-08T02:11:37.293054+00:00 app[web.1]: at
_combinedTickCallback (internal/process/next_tick.js:80:11)
2017-09-08T02:11:37.293055+00:00 app[web.1]: at
process._tickCallback (internal/process/next_tick.js:104:9)
2017-09-08T02:11:37.364314+00:00 heroku[web.1]: State changed from
starting to crashed
2017-09-08T02:11:37.353673+00:00 heroku[web.1]: Process exited with .
status 0
2017-09-08T02:11:49.712881+00:00 heroku[router]: at=error code=H10 .
desc="Appcrashed" method=GET path="/" host=roadie2.herokuapp.com
request_id=79e0bc3a-aa28-44bb-ab80-cfcf4f6cd97d fwd="99.92.51.34"
dyno= connect= service= status=503 bytes= protocol=https
2017-09-08T02:11:50.564503+00:00 heroku[router]: at=error code=H10
desc="Appcrashed" method=GET path="/favicon.ico"
host=roadie2.herokuapp.com request_id=c72e5077-494c-41f5-8be1-
f0c2c329d080 fwd="99.92.51.34" dyno= connect= service= status=503
bytes= protocol=https
2017-09-08T02:12:24.838901+00:00 heroku[router]: at=error code=H10 .
desc="Appcrashed" method=GET path="/" host=roadie2.herokuapp.com
request_id=ca551858-5372-40c9-abf1-670176b159dc fwd="99.92.51.34"
dyno= connect= service= status=503 bytes= protocol=https
2017-09-08T02:12:25.340624+00:00 heroku[router]: at=error code=H10
desc="Appcrashed" method=GET path="/favicon.ico"
host=roadie2.herokuapp.com request_id=c37b876d-5a59-40d0-9d59-
9be013c58d94 fwd="99.92.51.34" dyno= connect= service= status=503
bytes= protocol=https
config.json
{
"development": {
"username": "root",
"password":"",
"database": "roadie2",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": null,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"use_env_variable": "JAWSDB_URL",
"dialect": "mysql"
}
}
server.js
var express = require("express");
var bodyParser = require("body-parser");
// Sets up the Express App
// =============================================================
var app = express();
// var PORT = process.env.PORT || 3000;
var port = process.env.PORT
// Requiring our models for syncing
var db = require("./models");
// Sets up the Express app to handle data parsing
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.text());
app.use(bodyParser.json({ type: "application/vnd.api+json" }));
// Static directory
app.use(express.static("./public"));
// Routes =============================================================
require("./routes/html-routes.js")(app);
require("./routes/api-routes.js")(app);
// Syncing our sequelize models and then starting our express app
db.sequelize.sync().then(function() {
app.listen(port, function() {
console.log("App listening on PORT " + port);
});
});
models/index.js
'use strict';
var fs = require('fs');
var path = require('path');
var Sequelize = require('sequelize');
var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../config/config.json')[env];
var db = {};
if (config.use_env_variable) {
var sequelize = new
Sequelize(process.env[config.use_env_variable]);
} else {
var sequelize = new Sequelize(config.database, config.username,
config.password, config);
}
fs
.readdirSync(__dirname)
.filter(function(file) {
return (file.indexOf('.') !== 0) && (file !== basename) &&
(file.slice(-3) === '.js');
})
.forEach(function(file) {
var model = sequelize['import'](path.join(__dirname, file));
db[model.name] = model;
});
Object.keys(db).forEach(function(modelName) {
if (db[modelName].associate) {
db[modelName].associate(db);
}
});
db.sequelize = sequelize;
db.Sequelize = Sequelize;
module.exports = db;

https://devcenter.heroku.com/articles/error-codes#h10-app-crashed
Your logs clearly tell you why it's crash:
2017-09-08T02:11:37.293030+00:00 app[web.1]: Unhandled rejection .
SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:3306
You are unable to connect to your SQL server.
From the looks of it, you seemed to be trying to connect to 127.0.0.1:3306 which will not work. 127.0.0.1 or localhost is your local IP.
You need to either setup/connect to Heroku's Postgres addon or use an external SQL service such as Amazon RDS.

Related

Laravel 8.4 project on Heroku error 403 in Apache after Procfile

I am deploying my first Laravel project using this guide: https://appdividend.com/2018/04/17/how-to-deploy-laravel-project-on-heroku/
I have made it up until step 9, in other words: I created a Procfile without file extension with web: vendor/bin/heroku-php-apache2 public/, generated and set the encryption key and successfully deployed the project.
However, when I visit the site, every page throws a 500 HTTP error displaying my custom error pages. This most definitely does not happen locally.
(I made one static page direct towards my custom 503 error page instead, so that GET request is normal.)
When I check the logs using PowerShell with heroku logs --tail I receive the following output:
2021-06-17T11:54:55.644540+00:00 app[api]: Release v1 created by user [REDACTED]
2021-06-17T11:54:55.644540+00:00 app[api]: Initial release by user [REDACTED]
2021-06-17T11:54:55.799446+00:00 app[api]: Release v2 created by user [REDACTED]
2021-06-17T11:54:55.799446+00:00 app[api]: Enable Logplex by user [REDACTED]
2021-06-17T11:57:42.028071+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=[REDACTED].herokuapp.com request_id=b9bfe3e2-82de-47af-bae4-1d6cbc4a206e fwd="my public IP" dyno= connect= service= status=502 bytes= protocol=https
2021-06-17T11:57:42.568855+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=[REDACTED].herokuapp.com request_id=6e51df46-02e7-4d6d-b515-3fa1c4834613 fwd="my public IP" dyno= connect= service= status=502 bytes= protocol=https
2021-06-17T11:58:03.455474+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=[REDACTED].herokuapp.com request_id=b61ff6e6-b904-486c-9624-a4b7d7804ae1 fwd="my public IP" dyno= connect= service= status=502 bytes= protocol=https
2021-06-17T12:06:23.000000+00:00 app[api]: Build started by user [REDACTED]
2021-06-17T12:06:36.341144+00:00 app[api]: Deploy 1e8d4442 by user [REDACTED]
2021-06-17T12:06:36.341144+00:00 app[api]: Release v3 created by user [REDACTED]
2021-06-17T12:06:36.351809+00:00 app[api]: Scaled to web#1:Free by user [REDACTED]
2021-06-17T12:06:37.000000+00:00 app[api]: Build succeeded
2021-06-17T12:06:38.816708+00:00 heroku[web.1]: Starting process with command `heroku-php-apache2`
2021-06-17T12:06:42.411923+00:00 app[web.1]: Detected 536870912 Bytes of RAM
2021-06-17T12:06:42.443766+00:00 app[web.1]: PHP memory_limit is 128M Bytes
2021-06-17T12:06:42.456606+00:00 app[web.1]: Starting php-fpm with 4 workers...
2021-06-17T12:06:42.569696+00:00 app[web.1]: Starting httpd...
2021-06-17T12:06:42.707664+00:00 heroku[web.1]: State changed from starting to up
2021-06-17T12:06:52.248862+00:00 heroku[router]: at=info method=GET path="/" host=[REDACTED].herokuapp.com request_id=717e7ca1-d1da-4138-be09-5907e1700504 fwd="my public IP" dyno=web.1 connect=0ms service=1ms status=403 bytes=363 protocol=https
2021-06-17T12:06:52.248875+00:00 app[web.1]: [Thu Jun 17 12:06:52.248017 2021] [autoindex:error] [pid 154:tid 140377919043328] [client 10.41.181.68:21921] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-06-17T12:06:52.249127+00:00 app[web.1]: 10.41.181.68 - - [17/Jun/2021:12:06:52 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:12:36.039961+00:00 app[web.1]: [Thu Jun 17 12:12:36.038943 2021] [autoindex:error] [pid 153:tid 140377919043328] [client 10.11.176.31:24186] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-06-17T12:12:36.040254+00:00 app[web.1]: 10.11.176.31 - - [17/Jun/2021:12:12:36 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:12:36.040292+00:00 heroku[router]: at=info method=GET path="/" host=[REDACTED].herokuapp.com request_id=588a07f2-6a82-4b19-be26-d99e86508e58 fwd="my public IP" dyno=web.1 connect=1ms service=2ms status=403 bytes=363 protocol=https
2021-06-17T12:25:42.485188+00:00 app[web.1]: [Thu Jun 17 12:25:42.484171 2021] [autoindex:error] [pid 155:tid 140377851950848] [client 10.41.171.6:11185] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-06-17T12:25:42.485538+00:00 app[web.1]: 10.41.171.6 - - [17/Jun/2021:12:25:42 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:25:42.485879+00:00 heroku[router]: at=info method=GET path="/" host=[REDACTED].herokuapp.com request_id=e5fc29bf-1833-4b1c-87f0-47def5e79f58 fwd="my public IP" dyno=web.1 connect=4ms service=5ms status=403 bytes=363 protocol=https
2021-06-17T12:25:49.358661+00:00 app[web.1]: [Thu Jun 17 12:25:49.357969 2021] [autoindex:error] [pid 153:tid 140377784792832] [client 10.11.234.144:20872] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
2021-06-17T12:25:49.358970+00:00 app[web.1]: 10.11.234.144 - - [17/Jun/2021:12:25:49 +0000] "GET / HTTP/1.1" 403 199 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:25:49.359616+00:00 heroku[router]: at=info method=GET path="/" host=[REDACTED].herokuapp.com request_id=869f8dbd-262f-4462-b7bf-73294987cb14 fwd="my public IP" dyno=web.1 connect=0ms service=1ms status=403 bytes=363 protocol=https
2021-06-17T12:25:52.182757+00:00 app[web.1]: 10.11.234.144 - - [17/Jun/2021:12:25:52 +0000] "GET /favicon.ico HTTP/1.1" 404 196 "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:25:52.183507+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=[REDACTED].herokuapp.com request_id=aad7f101-8530-4270-8421-eb95038ad7f8 fwd="my public IP" dyno=web.1 connect=0ms service=1ms status=404 bytes=360 protocol=https
2021-06-17T12:33:54.000000+00:00 app[api]: Build started by user [REDACTED]
2021-06-17T12:34:07.641518+00:00 app[api]: Release v4 created by user [REDACTED]
2021-06-17T12:34:07.641518+00:00 app[api]: Deploy 30d06f26 by user [REDACTED]
2021-06-17T12:34:07.909412+00:00 heroku[web.1]: Restarting
2021-06-17T12:34:07.929249+00:00 heroku[web.1]: State changed from up to starting
2021-06-17T12:34:08.000000+00:00 app[api]: Build succeeded
2021-06-17T12:34:08.898217+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2021-06-17T12:34:08.962065+00:00 app[web.1]: SIGTERM received, attempting graceful shutdown...
2021-06-17T12:34:08.962075+00:00 app[web.1]: Stopping php-fpm...
2021-06-17T12:34:08.963414+00:00 app[web.1]: Stopping httpd...
2021-06-17T12:34:08.966608+00:00 app[web.1]: Shutdown complete.
2021-06-17T12:34:09.018975+00:00 heroku[web.1]: Process exited with status 143
2021-06-17T12:34:12.074660+00:00 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2 public/`
2021-06-17T12:34:17.481627+00:00 app[web.1]: DOCUMENT_ROOT changed to 'public/'
2021-06-17T12:34:17.582367+00:00 app[web.1]: Detected 536870912 Bytes of RAM
2021-06-17T12:34:17.619538+00:00 app[web.1]: PHP memory_limit is 128M Bytes
2021-06-17T12:34:17.639142+00:00 app[web.1]: Starting php-fpm with 4 workers...
2021-06-17T12:34:17.741847+00:00 app[web.1]: Starting httpd...
2021-06-17T12:34:18.057406+00:00 heroku[web.1]: State changed from starting to up
2021-06-17T12:34:40.311200+00:00 heroku[router]: at=info method=GET path="/" host=[REDACTED].herokuapp.com request_id=c694d2d3-d81d-4956-a56a-5e437fdd25af fwd="my public IP" dyno=web.1 connect=1ms service=244ms status=500 bytes=2276 protocol=https
2021-06-17T12:34:40.316794+00:00 app[web.1]: 10.13.167.33 - - [17/Jun/2021:12:34:40 +0000] "GET / HTTP/1.1" 500 2052 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:34:40.584831+00:00 heroku[router]: at=info method=GET path="/js/javascript.js" host=[REDACTED].herokuapp.com request_id=c4e5457f-54d6-47ab-a49b-25d0f6847a33 fwd="my public IP" dyno=web.1 connect=1ms service=2ms status=200 bytes=392 protocol=https
2021-06-17T12:34:40.590691+00:00 app[web.1]: 10.13.167.33 - - [17/Jun/2021:12:34:40 +0000] "GET /js/javascript.js HTTP/1.1" 200 148 "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:34:40.702186+00:00 heroku[router]: at=info method=GET path="/css/style.css" host=[REDACTED].herokuapp.com request_id=9966283b-2868-4eb0-99d4-ff23fcf3bf86 fwd="my public IP" dyno=web.1 connect=1ms service=2ms status=200 bytes=5614 protocol=https
2021-06-17T12:34:40.707977+00:00 app[web.1]: 10.13.167.33 - - [17/Jun/2021:12:34:40 +0000] "GET /css/style.css HTTP/1.1" 200 5381 "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:34:41.338600+00:00 heroku[router]: at=info method=GET path="/fonts/unispacefont/unispace_bd.woff2" host=[REDACTED].herokuapp.com request_id=abe1b487-b1d5-4e69-9ce3-522d71f273a4 fwd="my public IP" dyno=web.1 connect=1ms service=3ms status=200 bytes=19032 protocol=https
2021-06-17T12:34:41.339220+00:00 app[web.1]: 10.45.246.133 - - [17/Jun/2021:12:34:41 +0000] "GET /fonts/unispacefont/unispace_bd.woff2 HTTP/1.1" 200 18796 "https://[REDACTED].herokuapp.com/css/style.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:34:41.342795+00:00 app[web.1]: 10.13.167.33 - - [17/Jun/2021:12:34:41 +0000] "GET /img/background.gif HTTP/1.1" 200 527193 "https://[REDACTED].herokuapp.com/css/style.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:34:41.364937+00:00 heroku[router]: at=info method=GET path="/img/background.gif" host=[REDACTED].herokuapp.com request_id=84347863-b933-4905-806f-cb845841382c fwd="my public IP" dyno=web.1 connect=1ms service=35ms status=200 bytes=527430 protocol=https
2021-06-17T12:34:41.758978+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=[REDACTED].herokuapp.com request_id=6cdc7f4e-2f38-4eba-b68c-01007d056573 fwd="my public IP" dyno=web.1 connect=0ms service=1ms status=200 bytes=231 protocol=https
2021-06-17T12:34:41.764926+00:00 app[web.1]: 10.145.208.41 - - [17/Jun/2021:12:34:41 +0000] "GET /favicon.ico HTTP/1.1" 200 - "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:18.999443+00:00 heroku[router]: at=info method=GET path="/" host=[REDACTED].herokuapp.com request_id=c6fed9d7-927f-47d2-8b7d-d7ae778470ce fwd="my public IP" dyno=web.1 connect=1ms service=34ms status=500 bytes=2276 protocol=https
2021-06-17T12:38:19.001120+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:18 +0000] "GET / HTTP/1.1" 500 2052 "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:19.214613+00:00 heroku[router]: at=info method=GET path="/js/javascript.js" host=[REDACTED].herokuapp.com request_id=dddbe457-5c42-4690-b2bf-668f3fb6fa5b fwd="my public IP" dyno=web.1 connect=1ms service=1ms status=200 bytes=392 protocol=https
2021-06-17T12:38:19.216549+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:19 +0000] "GET /js/javascript.js HTTP/1.1" 200 148 "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:19.328406+00:00 heroku[router]: at=info method=GET path="/css/style.css" host=[REDACTED].herokuapp.com request_id=06c20f54-0efa-467f-a82c-8b0f31c236d1 fwd="my public IP" dyno=web.1 connect=1ms service=1ms status=304 bytes=129 protocol=https
2021-06-17T12:38:19.330477+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:19 +0000] "GET /css/style.css HTTP/1.1" 304 - "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:19.455017+00:00 heroku[router]: at=info method=GET path="/img/background.gif" host=[REDACTED].herokuapp.com request_id=e4786017-356b-4e00-8407-9f5db00aca76 fwd="my public IP" dyno=web.1 connect=1ms service=1ms status=304 bytes=130 protocol=https
2021-06-17T12:38:19.457067+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:19 +0000] "GET /img/background.gif HTTP/1.1" 304 - "https://[REDACTED].herokuapp.com/css/style.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:20.794980+00:00 heroku[router]: at=info method=GET path="/profile" host=[REDACTED].herokuapp.com request_id=7e86eddf-c38f-4350-bc34-a9a21f96d6ce fwd="my public IP" dyno=web.1 connect=1ms service=17ms status=500 bytes=2276 protocol=https
2021-06-17T12:38:20.797031+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:20 +0000] "GET /profile HTTP/1.1" 500 2052 "https://[REDACTED].herokuapp.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:22.055940+00:00 heroku[router]: at=info method=GET path="/assignments" host=[REDACTED].herokuapp.com request_id=2ba4e41b-c431-4658-b42e-719a47d38895 fwd="my public IP" dyno=web.1 connect=1ms service=25ms status=500 bytes=2276 protocol=https
2021-06-17T12:38:22.057700+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:22 +0000] "GET /assignments HTTP/1.1" 500 2052 "https://[REDACTED].herokuapp.com/profile" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:22.916661+00:00 heroku[router]: at=info method=GET path="/motivatie" host=[REDACTED].herokuapp.com request_id=290562af-a18a-42b1-bd97-34007a70ae9b fwd="my public IP" dyno=web.1 connect=1ms service=11ms status=500 bytes=2276 protocol=https
2021-06-17T12:38:22.918708+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:22 +0000] "GET /motivatie HTTP/1.1" 500 2052 "https://[REDACTED].herokuapp.com/assignments" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:23.758614+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:23 +0000] "GET /beroepsbeeld HTTP/1.1" 500 2052 "https://[REDACTED].herokuapp.com/motivatie" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:38:23.759586+00:00 heroku[router]: at=info method=GET path="/beroepsbeeld" host=[REDACTED].herokuapp.com request_id=689a9d3c-5416-40de-9a4b-6a61ffefb786 fwd="my public IP" dyno=web.1 connect=1ms service=15ms status=500 bytes=2276 protocol=https
2021-06-17T12:38:24.542760+00:00 heroku[router]: at=info method=GET path="/error/503" host=[REDACTED].herokuapp.com request_id=8abe0728-5b95-4935-8dd3-3fd33e326f43 fwd="my public IP" dyno=web.1 connect=1ms service=19ms status=500 bytes=2276 protocol=https
2021-06-17T12:38:24.544759+00:00 app[web.1]: 10.13.238.239 - - [17/Jun/2021:12:38:24 +0000] "GET /error/503 HTTP/1.1" 500 2052 "https://[REDACTED].herokuapp.com/beroepsbeeld" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
2021-06-17T12:40:48.596106+00:00 app[api]: Starting process with command `php -a` by user [REDACTED]
2021-06-17T12:40:52.937251+00:00 heroku[run.9243]: State changed from starting to up
2021-06-17T12:40:53.278275+00:00 heroku[run.9243]: Awaiting client
2021-06-17T12:40:53.311177+00:00 heroku[run.9243]: Starting process with command `php -a`
2021-06-17T12:41:46.949422+00:00 heroku[run.9243]: Process exited with status 255
2021-06-17T12:41:47.020869+00:00 heroku[run.9243]: State changed from up to complete
I honestly have no idea how to grant Heroku the access it wants.
I have successfully integrated the free pgsql database from Heroku into the project from step 11 and I am able to migrate both on the cloud and on the local copy. However, I am unable to seed on the cloud. I suspect this to be related to the issue above.
Class Faker/Factory not found error during seeding:
If your app uses a database, you might configure this first using step 10 and 11 of your tutorial.

iOS simulator app doesn't launch when 'detox test' command executed #2305

Description
iOS simulator app doesn't launch when 'detox test' command executed
Detox --loglevel verbose output shows [DetoxServer.js/CANNOT_FORWARD]
[x] I have tested this issue on the latest Detox release and it still reproduces
Reproduction
Detox tests were last running in April with the following setup
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "jest"
},
"dependencies": {
"expo": "^37.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz",
},
"devDependencies": {
"detox": "^15.3.0",
"detox-expo-helpers": "^0.6.0",
"expo-detox-hook": "^1.0.10",
"jest-expo": "^37.0.0",
"metro-react-native-babel-preset": "^0.53.1",
"react-native-testing-library": "^1.12.0",
"react-test-renderer": "^16.12.0",
},
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?react-native|react-clone-referenced-element|#react-native-community|expo(nent)?|#expo(nent)?/.*|react-navigation|#react-navigation/.*|#unimodules/.*|unimodules|#sentry/.*|sentry-expo|native-base|react-native-multi-slider|#ptomasroos/.*)"
],
"setupFilesAfterEnv": [
"<rootDir>/unit_tests/setupTests.js"
],
"testMatch": [
"<rootDir>/unit_tests/**/*.test.js?(x)"
]
},
"detox": {
"test-runner": "jest",
"configurations": {
"ios.sim": {
"binaryPath": "<app_name>.app",
"type": "ios.simulator",
"name": "iPhone 11 Pro Max"
}
}
}
}
They are now failing as described above with the following package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "jest"
},
"dependencies": {
"expo": "^37.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz",
},
"devDependencies": {
"detox": "^17.4.5",
"detox-expo-helpers": "^0.6.0",
"expo-detox-hook": "^1.0.10",
"jest-expo": "^37.0.0",
"metro-react-native-babel-preset": "^0.53.1",
"react-native-testing-library": "^1.12.0",
"react-test-renderer": "^16.12.0",
},
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?react-native|react-clone-referenced-element|#react-native-community/async-storage/.*|expo(nent)?|#expo(nent)?/.*|react-navigation|#react-navigation/.*|#unimodules/.*|unimodules|#sentry/.*|sentry-expo|native-base|react-native-multi-slider|#ptomasroos/.*)"
],
"setupFilesAfterEnv": [
"<rootDir>/unit_tests/setupTests.js"
],
"testMatch": [
"<rootDir>/unit_tests/**/*.test.js?(x)"
]
},
"detox": {
"test-runner": "jest",
"configurations": {
"ios.sim": {
"binaryPath": "<app_name>.app",
"type": "ios.simulator",
"name": "iPhone 11 Pro Max"
}
}
}
}
Expected behavior
Running detox test should open the app in the simulator and execute tests.
Environment (please complete the following information):
Detox: 17.4.5
React Native: 0.61
Node: v14.5.0
Device: iOS simulator iPhone 11 pro max
Xcode: 11.3.1 (Using expo for development)
iOS: 13.3
macOS: 10.14.4
Logs
If you are experiencing a timeout in your test
[x] I have followed the instructions under Lower-level Idling Resources Debug and am providing the log below:
Tried running detox test --debug-synchronization 200
the terminal hangs with the following output
detox[16107] INFO: [test.js] debugSynchronization=200 reportSpecs=true useCustomLogger=true forceAdbInstall=false DETOX_START_TIMESTAMP=1599257790958 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:android:).)*$' --maxWorkers 1 e2e
detox[16109] INFO: at e2e/tests/Auth/login.spec.js:11:11
describe(Auth)
detox[16109] INFO: at e2e/init.js:21:19
beforeAll
detox[16109] INFO: [DetoxServer.js] server listening on localhost:62081...
detox[16109] INFO: at e2e/init.js:28:19
initialized
RUNS e2e/tests/Auth/login.spec.js
Tried adding ‘detoxPrintBusyIdleResources’
terminal hangs with output ‘Filtering the log data using "category == "EarlGreyStatistics””’
Try adding ‘disableSynchroniztion’.
After running detox test, the test code seems to stall at ‘await device.disableSynchronization’ (a console log is never called on the next line of code)
Device and verbose Detox logs
[x] I have run my tests using the --loglevel trace argument and am providing the verbose log below:
detox[15678] INFO: [test.js] configuration="ios.sim" loglevel="verbose" cleanup=true reportSpecs=true useCustomLogger=true forceAdbInstall=false DETOX_START_TIMESTAMP=1599256657224 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:android:).)*$' --maxWorkers 1 e2e
detox[15680] INFO: at e2e/tests/Auth/login.spec.js:11:11
describe(Auth)
detox[15680] INFO: at e2e/init.js:21:19
beforeAll
detox[15680] INFO: [DetoxServer.js] server listening on localhost:61596...
detox[15680] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:61596
detox[15680] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773
detox[15680] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773
detox[15680] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "iPhone 11 Pro Max"
detox[15680] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 0BABC374-4903-4E95-A1CB-C265C656F1D6 --maxResults 1
detox[15680] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 0BABC374-4903-4E95-A1CB-C265C656F1D6 [BUNDLE_ID]
detox[15680] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling [BUNDLE_ID]...
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #2] [BUNDLE_ID] uninstalled
detox[15680] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 0BABC374-4903-4E95-A1CB-C265C656F1D6 "/Users/bryanboyko/XCode/<app_name>.app"
detox[15680] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/bryanboyko/XCode/<app_name>.app...
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/bryanboyko/XCode/<app_name>.app installed
detox[15680] INFO: at e2e/init.js:28:19
initialized
detox[15680] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773)
detox[15680] INFO: Auth: should show main feed after manual login
detox[15680] INFO: at e2e/init.js:57:19
before each
detox[15680] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 0BABC374-4903-4E95-A1CB-C265C656F1D6 [BUNDLE_ID]
detox[15680] DEBUG: [exec.js/EXEC_TRY, #4] Terminating [BUNDLE_ID]...
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #4] [BUNDLE_ID] terminated
detox[15680] DEBUG: [exec.js/EXEC_CMD, #5] applesimutils --byId 0BABC374-4903-4E95-A1CB-C265C656F1D6 --bundle [BUNDLE_ID] --restartSB --setPermissions location=inuse,notifications=YES
detox[15680] DEBUG: [exec.js/EXEC_TRY, #5] Trying to set permissions...
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #5] Permissions are set
detox[15680] DEBUG: [exec.js/EXEC_CMD, #6] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/bryanboyko/Library/ExpoDetoxHook/ios/58b2f26a0f87b2136ea15b6c467bcf04a21fd6e7/ExpoDetoxHook.framework/ExpoDetoxHook:/Users/bryanboyko/Library/Detox/ios/26afbf8d93760131ef9f1ae830bc7169ba83b8b0/Detox.framework/Detox" /usr/bin/xcrun simctl launch 0BABC374-4903-4E95-A1CB-C265C656F1D6 [BUNDLE_ID] --args -detoxServer "ws://localhost:61596" -detoxSessionId "25a0b4f5-f767-48a9-1a95-ca18b51c4773" -EXKernelDisableNuxDefaultsKey "true" -detoxURLBlacklistRegex "\("http://192.168.1.19:19001/onchange","https://e.crashlytics.com/spi/v2/events"\)" -detoxURLOverride "exp://192.168.1.19:19000" -detoxSourceAppOverride "host.exp.exponent"
detox[15680] DEBUG: [exec.js/EXEC_TRY, #6] Launching [BUNDLE_ID]...
detox[15680] DEBUG: [exec.js/EXEC_CMD, #7] /usr/bin/xcrun simctl get_app_container 0BABC374-4903-4E95-A1CB-C265C656F1D6 [BUNDLE_ID]
detox[15680] INFO: [AppleSimUtils.js] [BUNDLE_ID] launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn 0BABC374-4903-4E95-A1CB-C265C656F1D6 log stream --level debug --style compact --predicate 'process == "[BUNDLE_ID]"'
detox[15680] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773)
detox[15680] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773
detox[15680] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773
detox[15680] INFO: at e2e/tests/Auth/login.spec.js:37:21
1st test
detox[15680] INFO: Auth: should show main feed after manual login [FAIL]
detox[15680] INFO: at e2e/init.js:73:19
after all
detox[15680] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
(id = 1) setSyncSettings: {"enabled":false}
(id = 2) invoke: {"type":"expectation","predicate":{"type":"id","value":"LOGIN_VIEW"},"expectation":"toBeVisible"}
(id = -1000) isReady: {}
That might be the reason why the test "Auth should show main feed after manual login" has timed out.
detox[15680] DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl shutdown 0BABC374-4903-4E95-A1CB-C265C656F1D6
detox[15680] DEBUG: [exec.js/EXEC_TRY, #8] Shutting down 0BABC374-4903-4E95-A1CB-C265C656F1D6...
detox[15680] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773
detox[15680] DEBUG: [DetoxServer.js/DISCONNECT] role=testee, sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773
detox[15680] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=tester not connected, cannot fw action (sessionId=25a0b4f5-f767-48a9-1a95-ca18b51c4773)
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #8] 0BABC374-4903-4E95-A1CB-C265C656F1D6 shut down
detox[15680] DEBUG: [DetoxServer.js/WS_CLOSE] Detox server connections terminated gracefully
FAIL e2e/tests/Auth/login.spec.js (547.778s)
Auth
✕ should show main feed after manual login (240426ms)
● Auth › should show main feed after manual login
Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.
at mapper (../node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Auth › should show main feed after manual login
Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
at mapper (../node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Auth › should show main feed after manual login
: Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
30 |
[private login info]
34 |
35 | // DOUBLE TAP LOGIN BUTTON
at new Spec (../node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
at Suite.<anonymous> (tests/Auth/login.spec.js:32:3)
at Object.<anonymous> (tests/Auth/login.spec.js:10:1)
detox[15680] INFO: at e2e/init.js:21:19
beforeAll
detox[15680] INFO: [DetoxServer.js] server listening on localhost:61703...
detox[15680] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:61703
detox[15680] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=d7d6ad2d-d095-81b0-7955-6b83885362a3
detox[15680] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=d7d6ad2d-d095-81b0-7955-6b83885362a3
detox[15680] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "iPhone 11 Pro Max"
detox[15680] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 0BABC374-4903-4E95-A1CB-C265C656F1D6 --maxResults 1
detox[15680] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl boot 0BABC374-4903-4E95-A1CB-C265C656F1D6
detox[15680] DEBUG: [exec.js/EXEC_TRY, #2] Booting device 0BABC374-4903-4E95-A1CB-C265C656F1D6...
detox[15680] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl bootstatus 0BABC374-4903-4E95-A1CB-C265C656F1D6
detox[15680] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl io 0BABC374-4903-4E95-A1CB-C265C656F1D6 screenshot "/dev/null"
detox[15680] DEBUG: [exec.js/EXEC_CMD, #5] /usr/bin/xcrun simctl uninstall 0BABC374-4903-4E95-A1CB-C265C656F1D6 [BUNDLE_ID]
detox[15680] DEBUG: [exec.js/EXEC_TRY, #5] Uninstalling [BUNDLE_ID]...
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #5] [BUNDLE_ID] uninstalled
detox[15680] DEBUG: [exec.js/EXEC_CMD, #6] /usr/bin/xcrun simctl install 0BABC374-4903-4E95-A1CB-C265C656F1D6 "/Users/bryanboyko/XCode/<app_name>.app"
detox[15680] DEBUG: [exec.js/EXEC_TRY, #6] Installing /Users/bryanboyko/XCode/<app_name>.app...
detox[15680] DEBUG: [exec.js/EXEC_SUCCESS, #6] /Users/bryanboyko/XCode/<app_name>.app installed
detox[15680] INFO: at e2e/init.js:28:19
initialized
detox[15680] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=d7d6ad2d-d095-81b0-7955-6b83885362a3)
RUNS e2e/tests/Auth/registration.spec.js
I also ran into this issue and was able to resolve it by starting Xcode and starting a new simulator that was unrelated to the detox simulator. My guess is that starting a new simulator via Xcode helped bust a hang.
However, I'm also aware that disablingSynchronization is generally to be avoided. So my first recommendation is to comment that out and retry. If that doesn't work, then try my weird Xcode hack with it commented it out and go from there.
For reference, here is the documentation on disableSynchronization, which should explain why adding it should be avoided if possible: https://github.com/wix/detox/blob/master/docs/Troubleshooting.Synchronization.md#controlling-the-entire-synchronization-mechanism

Grafana image renderer plugin not working

i have grafana 7.0.5 with image rendrer plugin v2.0
in grafana.ini
root_url = http://myServer.com/grafana
and grafana is running behind an apache with :
ProxyPass /grafana http://127.0.0.1:3000
ProxyPassReverse /grafana http://127.0.01:3000
When i try to render an image of a panle with : [Direct link rendered image], browser wait for about 1 mn and then i have :
in the log file : i have
t=2020-07-08T15:12:46+0200 lvl=info msg=Rendering logger=rendering renderer=plugin path="d-solo/mT2tktqZk/fiche-departementale?orgId=1&from=1594192067086&to=1594213667086&var-liste_dep=All&var-date2_deb=&var-date2_fin=&var-type_et=ETF&var-type_et=ETD&var-type_et=ETVM&var-type_et=ETFR&var-type_et=ETM&var-type_et=ETC&var-type_et=ETT&panelId=6&width=1000&height=500&tz=Europe%2FParis"
t=2020-07-08T15:12:46+0200 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname= method=GET path=/d-solo/mT2tktqZk/fiche-departementale status=200 remote_addr=[::1] time_ms=2 size=34727 referer=
t=2020-07-08T15:12:47+0200 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname= method=GET path=/api/dashboards/uid/mT2tktqZk status=200 remote_addr=[::1] time_ms=2 size=11580 referer="http://localhost:3000/grafana/d-solo/mT2tktqZk/fiche-departementale?orgId=1&from=1594192067086&to=1594213667086&var-liste_dep=All&var-date2_deb=&var-date2_fin=&var-type_et=ETF&var-type_et=ETD&var-type_et=ETVM&var-type_et=ETFR&var-type_et=ETM&var-type_et=ETC&var-type_et=ETT&panelId=6&width=1000&height=500&tz=Europe%2FParis&render=1"
t=2020-07-08T15:12:47+0200 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname= method=POST path=/api/tsdb/query status=200 remote_addr=[::1] time_ms=2 size=927 referer="http://localhost:3000/grafana/d-solo/mT2tktqZk/fiche-departementale?orgId=1&from=1594192067086&to=1594213667086&var-liste_dep=All&var-date2_deb=&var-date2_fin=&var-type_et=ETF&var-type_et=ETD&var-type_et=ETVM&var-type_et=ETFR&var-type_et=ETM&var-type_et=ETC&var-type_et=ETT&panelId=6&width=1000&height=500&tz=Europe%2FParis&render=1"
t=2020-07-08T15:12:48+0200 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname= method=POST path=/api/tsdb/query status=400 remote_addr=[::1] time_ms=2 size=1798 referer="http://localhost:3000/grafana/d-solo/mT2tktqZk/fiche-departementale?orgId=1&from=1594192067086&to=1594213667086&var-liste_dep=All&var-date2_deb=&var-date2_fin=&var-type_et=ETF&var-type_et=ETD&var-type_et=ETVM&var-type_et=ETFR&var-type_et=ETM&var-type_et=ETC&var-type_et=ETT&panelId=6&width=1000&height=500&tz=Europe%2FParis&render=1"
t=2020-07-08T15:12:48+0200 lvl=eror msg="Browser console error" logger=plugins.backend pluginId=grafana-image-renderer msg="Failed to load resource: the server responded with a status of 400 (Bad Request)" url=http://localhost:3000/grafana/api/tsdb/query
t=2020-07-08T15:13:48+0200 lvl=info msg="Rendering timed out" logger=rendering renderer=plugin
t=2020-07-08T15:13:48+0200 lvl=eror msg="Timeout error. You can set timeout in seconds with &timeout url parameter" logger=context userId=1 orgId=1 uname=admin error="Timeout error. You can set timeout in seconds with &timeout url parameter"
t=2020-07-08T15:13:48+0200 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/mT2tktqZk/fiche-departementale status=500 remote_addr="193.41.223.244, 192.168.255.162" time_ms=62022 size=1791 referer="https://sigdca.rct01.kleegroup.com/grafana/d/mT2tktqZk/fiche-departementale?orgId=1"
t=2020-07-08T15:13:49+0200 lvl=eror msg="Render request failed" logger=plugins.backend pluginId=grafana-image-renderer url="http://localhost:3000/grafana/d-solo/mT2tktqZk/fiche-departementale?orgId=1&from=1594192067086&to=1594213667086&var-liste_dep=All&var-date2_deb=&var-date2_fin=&var-type_et=ETF&var-type_et=ETD&var-type_et=ETVM&var-type_et=ETFR&var-type_et=ETM&var-type_et=ETC&var-type_et=ETT&panelId=6&width=1000&height=500&tz=Europe%2FParis&render=1" error="TimeoutError: waiting for function failed: timeout 60000ms exceeded"
Can i get some help with this plz, i’m stuck
Provide the values as follows
GF_RENDERING_SERVER_URL: http://myServer.com/render
GF_RENDERING_CALLBACK_URL: http://myServer.com/grafana
the error came from the dashboard SQL query, so when you try to render a dashboard with an error in its SQL query it fails rendering.

Run Appiumtest on iOS Realdevice via. Intern

I’m currently trying to run my tests on an iOS iPhone7 PLUS.
The current situation is that I can trigger my testsuite from IntelliJ to the selenium HUB (Windows) and route the request to Appium Server (Mac). After that my WebDriverAgentRunner starts and open Safari on my iPhone unforunatley it starts appium.io instead of running my testsuite. Any Suggestions what could be the reason?
Below you can see the general informations and my AppiumServer Logfile.
I follow this guide to setup my WebDriverAgentRunner
https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
Thank you in advance!!!
Best Regards
Kai
General:
Windows:
Windows 7
Running Selenium Hub (java -jar selenium-server-standalone-3.4.0.jar -role hub)
Intern configuration:
tunnel: “NullTunnel”,
tunnelOptions: {
host: “localhost:4444”
// port: “4444”
},
environments: [ {
browserName: "Safari",
platformName: [ "iOS"],
platformVersion: [ "10.3" ],
platform: [ "MAC" ],
deviceName: ["iPhone7Plus"],
fixSessionCapabilities: "false"
}],
proxyUrl: "http://XXXXX000:9000/",
Mac Book iOS 10.12.5 Sierra :
Appium Version 1.6.5
Running Appium Server (appium --nodeconfig iPhoneNode.json -U XXXX)
iPhoneNode.json
{
“capabilities”: [
{
“browserName”: “Safari”,
“maxInstance”: 1,
“platformName”: “iOS”,
“platformVersion” : “10.3”,
“startIWDP”: true,
“udid”: “UID_Pseudo”,
“deviceName”: “iPhone7Plus”,
“platform”: “MAC”
}
],
“configuration”:
{
“cleanUpCycle”:2000,
“timeout”:30000,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“url”: “http://XXXXX:4723/wd/hub”,
“host”: “XXXXX”,
“port”: 4723,
“maxSession”: 1,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “XXXXX000”,
“hub”: “XXXXX000:4444/grid/register”
}
}
I install the following packages on Mac:
npm install -g appium
npm install -g ios-deploy
npm install appium doctor
brew install libtoolize
brew install automaker
brew install --HEAD libmobiledevice
xcode-select–install
brew install carthage
Real Device
iPhone 7
Installed Apps
SafariLauncher & WebDriverAgentRunner via xCode
Now i try to start my envrioment:
Start SeleniumGrid Hub Sucessfully
Start AppiumServer and Connect to Hub Sucessfully
Start Test from IntelleJ getTimeout
Now the iPhone is Opening the Safari Browser and it navigate to the wrong wesbite (appium.io website)
For details see AppiumServerLog:
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“name”:“build/webapp/app/intern”,“idle-timeout”:60,“browserName”:“Safari”,“platformName”:“iOS”,“platformVersion”:“10.3”,“platform”:“MAC”,“deviceName”:“iPhone7Plus”},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1500650988235 (17:29:48 GMT+0200 (CEST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] name: ‘build/webapp/app/intern’
[Appium] idle-timeout: 60
[Appium] browserName: ‘Safari’
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.3’
[Appium] platform: ‘MAC’
[Appium] deviceName: ‘iPhone7Plus’
[Appium] udid: ‘UID_Pseudo’
[debug] [XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: name, idle-timeout, platform.
[BaseDriver] Session created with session id: fa9234e0-c195-4384-9b29-8d437a76d215
[debug] [XCUITest] Xcode version set to ‘8.3.3’ (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1500650988431 (17:29:48 GMT+0200 (CEST))
[debug] [XCUITest] Available devices: UID_Pseudo
[debug] [XCUITest] Creating iDevice object with udid ‘UID_Pseudo’
[XCUITest] Determining device to run tests on: udid: ‘UID_Pseudo’, real device: true
[XCUITest] Safari test requested
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1500650988600 (17:29:48 GMT+0200 (CEST))
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1500650988600 (17:29:48 GMT+0200 (CEST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1500650988601 (17:29:48 GMT+0200 (CEST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1500650988754 (17:29:48 GMT+0200 (CEST))
[XCUITest] Setting up real device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1500650988757 (17:29:48 GMT+0200 (CEST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=UID_Pseudo -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /Users/tnk/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/BA8AABB7-9F1B-4C6F-9D63-BE4B3250C46E/Session-WebDriverAgentRunner-2017-07-21_172956-nNAexN.log
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
ebug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651032579 (17:30:32 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651033651 (17:30:33 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[HTTP] <-- GET /wd/hub/status - - ms - -
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651034660 (17:30:34 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651035670 (17:30:35 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651036680 (17:30:36 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651037690 (17:30:37 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
[debug] [BaseDriver] Event ‘wdaSessionAttempted’ logged at 1500651038751 (17:30:38 GMT+0200 (CEST))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Failed to create WDA session. Retrying…
^C[Appium] Received SIGINT - shutting down
[debug] [XCUITest] iproxy exited with code ‘null’
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=’ test
The test is running without an end see log:
2017-07-24 09:00:26.860964+0200 XCTRunner[259:9227] Running tests…
2017-07-24 09:00:27.495866+0200 XCTRunner[259:9227] Continuing to run tests in the background with task ID 1
Test Suite ‘All tests’ started at 2017-07-24 09:00:28.149
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-07-24 09:00:28.150
Test Suite ‘UITestingUITests’ started at 2017-07-24 09:00:28.150
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-07-24 09:00:28.151
t = 0.00s Set Up
2017-07-24 09:00:28.162188+0200 XCTRunner[259:9347] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x17011f1d0> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application’s container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-07-24 09:00:28.162802+0200 XCTRunner[259:9227] Built at Jul 24 2017 07:59:00
2017-07-24 09:00:28.179892+0200 XCTRunner[259:9227] ServerURLHere->http://10.192.1.103:8100<-ServerURLHere

MongoDB Record To Array Takes Forever

I'm getting information from the database (MongoDB) and then converting it to an array like that:
#bs = coll.find("headers.from" => { "$regex" => email, "$options" => 'i' }, "date" => {"$gte" => initial_date, "$lte" => Time.now.utc})
puts "a seguir ao fetch"
puts #bs
#bs = #bs.to_a
This works very well but sometimes, it just enters in an infinite cycle (I believe) because It crashes my heroku app.
The response (the first line is the print of #bs):
2011-05-14T17:05:46+00:00 app[web.1]: DBResponse(flags=, cursor_id=, start=)
2011-05-14T17:06:16+00:00 heroku[router]: Error H12 (Request timeout) -> GET yapi.heroku.com/api/v1/69399ead0ed4ded38e7a101f7c8faf/2011-2-1.json dyno=web.1 queue=0 wait=0ms service=0ms bytes=0
2011-05-14T17:06:47+00:00 heroku[router]: Error H12 (Request timeout) -> GET yapi.heroku.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=0ms bytes=0
2011-05-14T17:07:10+00:00 heroku[router]: Error H12 (Request timeout) -> GET yapi.heroku.com/api/v1/69399ead0ed4ded38e7a101f7c8faf/2011-2-1.json dyno=web.1 queue=0 wait=0ms service=0ms bytes=0
2011-05-14T17:07:17+00:00 heroku[router]: Error H12 (Request timeout) -> GET yapi.heroku.com/api/v1/69399ead0ed4ded38e7a101f7c8faf/2011-2-1.json dyno=web.1 queue=0 wait=0ms service=0ms bytes=0
2011-05-14T17:07:51+00:00 heroku[router]: Error H12 (Request timeout) -> GET yapi.heroku.com/api/v1/69399ead0ed4ded38e7a101f7c8faf/2011-2-1.json dyno=web.1 queue=0 wait=0ms service=0ms bytes=0
I'd like to know why because I really can't find out why with all the debug information. IT just holds on the ".to_a" forever and the server is blocked.
Please help.
Thanks
From what I see, there is no reason for RoR to terminate this loop.
If you can, try initializing it as a Kernel#Array. Try this:
Array([1,2,3]) #=> [1, 2, 3]
Array(123) #=> [123]
Instead of:
arg = arg.to_a