I already have the master branch in the remote repository, but I want to have another version in an already created branch called withoutcomments and when I push it tells me this:
I don't know how to solve it, I hope someone can help me.
I'm trying to deploy my application on Heroku and it gives me an 'Application error', I had already deployed it without problems before and it worked fine, I started to add some more things, create an api, add POST's and GET's, I pushed it again and it stopped to function. It gives me this error when opening my application in heroku, it is worth mentioning that locally it works fine, even using ngrok from Vs.
Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail
When viewing the logs from heroku it tells me this:
2021-02-18T14:28:25.869957+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=chatbotlaboratorio.herokuapp.com
request_id=a189272f-353d-4015-b7c7-ccfffd4d5e43 fwd="187.228.67.38" dyno=
connect= service= status=503 bytes= protocol=https
2021-02-18T14:28:26.080311+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=chatbotlaboratorio.herokuapp.com
request_id=4fdfaba7-9df2-4629-86c2-63df53a6185e fwd="187.228.67.38" dyno=
connect= service= status=503 bytes= protocol=https
2021-02-18T14:36:01.159267+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/robots.txt" host=chatbotlaboratorio.herokuapp.com
request_id=5794baee-2ada-4b3b-a1c8-2704c1a5ca88 fwd="94.130.167.103" dyno=
connect= service= status=503 bytes= protocol=http
2021-02-18T14:36:01.366649+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=chatbotlaboratorio.herokuapp.com
request_id=87bc0bb7-ce64-4df1-9e9a-f4901698eaa8 fwd="94.130.167.103" dyno=
connect= service= status=503 bytes= protocol=http
2021-02-18T14:41:14.391693+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/" host=chatbotlaboratorio.herokuapp.com
request_id=65463729-4be1-4d79-9d6c-3ebfbd1da7f0 fwd="187.228.67.38" dyno=
connect= service= status=503 bytes= protocol=https
2021-02-18T14:41:14.659036+00:00 heroku[router]: at=error code=H10 desc="App
crashed" method=GET path="/favicon.ico" host=chatbotlaboratorio.herokuapp.com
request_id=68a27808-7b8c-4436-9a60-2becf4e18448 fwd="187.228.67.38" dyno=
connect= service= status=503 bytes= protocol=https
2021-02-18T14:41:58.578306+00:00 heroku[web.1]: State changed from crashed to
starting
2021-02-18T14:42:03.075789+00:00 heroku[web.1]: Starting process with command
`npm start`
2021-02-18T14:42:06.460302+00:00 app[web.1]:
2021-02-18T14:42:06.460321+00:00 app[web.1]: > [email protected] start /app
2021-02-18T14:42:06.460321+00:00 app[web.1]: > node server.js
2021-02-18T14:42:06.460322+00:00 app[web.1]:
2021-02-18T14:42:07.488076+00:00 app[web.1]:
internal/modules/cjs/loader.js:883
2021-02-18T14:42:07.488099+00:00 app[web.1]: throw err;
2021-02-18T14:42:07.488100+00:00 app[web.1]: ^
2021-02-18T14:42:07.488100+00:00 app[web.1]:
2021-02-18T14:42:07.488102+00:00 app[web.1]: Error: Cannot find module
'../chatbotDialogflowNodejs/config'
2021-02-18T14:42:07.488102+00:00 app[web.1]: Require stack:
2021-02-18T14:42:07.488103+00:00 app[web.1]: - /app/server.js
2021-02-18T14:42:07.488105+00:00 app[web.1]: at
Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
2021-02-18T14:42:07.488105+00:00 app[web.1]: at Function.Module._load
(internal/modules/cjs/loader.js:725:27)
2021-02-18T14:42:07.488105+00:00 app[web.1]: at Module.require
(internal/modules/cjs/loader.js:952:19)
2021-02-18T14:42:07.488106+00:00 app[web.1]: at require
(internal/modules/cjs/helpers.js:88:18)
2021-02-18T14:42:07.488106+00:00 app[web.1]: at Object.<anonymous>
(/app/server.js:5:16)
2021-02-18T14:42:07.488107+00:00 app[web.1]: at Module._compile
(internal/modules/cjs/loader.js:1063:30)
2021-02-18T14:42:07.488107+00:00 app[web.1]: at
Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
2021-02-18T14:42:07.488107+00:00 app[web.1]: at Module.load
(internal/modules/cjs/loader.js:928:32)
2021-02-18T14:42:07.488108+00:00 app[web.1]: at Function.Module._load
(internal/modules/cjs/loader.js:769:14)
2021-02-18T14:42:07.488109+00:00 app[web.1]: at
Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:72:12)
2021-02-18T14:42:07.488109+00:00 app[web.1]: at
internal/main/run_main_module.js:17:47 {
2021-02-18T14:42:07.488109+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2021-02-18T14:42:07.488110+00:00 app[web.1]: requireStack: [
'/app/server.js' ]
2021-02-18T14:42:07.488110+00:00 app[web.1]: }
2021-02-18T14:42:07.518235+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-02-18T14:42:07.518886+00:00 app[web.1]: npm ERR! errno 1
2021-02-18T14:42:07.530496+00:00 app[web.1]: npm ERR! [email protected]
start: `node server.js`
2021-02-18T14:42:07.530760+00:00 app[web.1]: npm ERR! Exit status 1
2021-02-18T14:42:07.531075+00:00 app[web.1]: npm ERR!
2021-02-18T14:42:07.531340+00:00 app[web.1]: npm ERR! Failed at the
[email protected] start script.
2021-02-18T14:42:07.531573+00:00 app[web.1]: npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
2021-02-18T14:42:07.542523+00:00 app[web.1]:
2021-02-18T14:42:07.542855+00:00 app[web.1]: npm ERR! A complete log of this
run can be found in:
2021-02-18T14:42:07.543029+00:00 app[web.1]: npm ERR!
/app/.npm/_logs/2021-02-18T14_42_07_532Z-debug.log
2021-02-18T14:42:07.608653+00:00 heroku[web.1]: Process exited with status 1
2021-02-18T14:42:07.676122+00:00 heroku[web.1]: State changed from starting
to crashed
2021-02-18T14:42:07.684683+00:00 heroku[web.1]: State changed from crashed to
starting
2021-02-18T14:42:11.825694+00:00 heroku[web.1]: Starting process with command
`npm start`
2021-02-18T14:42:14.925472+00:00 app[web.1]:
2021-02-18T14:42:14.925644+00:00 app[web.1]: > [email protected] start /app
2021-02-18T14:42:14.925645+00:00 app[web.1]: > node server.js
2021-02-18T14:42:14.925650+00:00 app[web.1]:
2021-02-18T14:42:15.679796+00:00 app[web.1]:
internal/modules/cjs/loader.js:883
2021-02-18T14:42:15.679842+00:00 app[web.1]: throw err;
2021-02-18T14:42:15.679842+00:00 app[web.1]: ^
2021-02-18T14:42:15.679843+00:00 app[web.1]:
2021-02-18T14:42:15.679843+00:00 app[web.1]: Error: Cannot find module
'../chatbotDialogflowNodejs/config'
2021-02-18T14:42:15.679844+00:00 app[web.1]: Require stack:
2021-02-18T14:42:15.679844+00:00 app[web.1]: - /app/server.js
2021-02-18T14:42:15.679845+00:00 app[web.1]: at
Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
2021-02-18T14:42:15.679845+00:00 app[web.1]: at Function.Module._load
(internal/modules/cjs/loader.js:725:27)
2021-02-18T14:42:15.679846+00:00 app[web.1]: at Module.require
(internal/modules/cjs/loader.js:952:19)
2021-02-18T14:42:15.679846+00:00 app[web.1]: at require
(internal/modules/cjs/helpers.js:88:18)
2021-02-18T14:42:15.679847+00:00 app[web.1]: at Object.<anonymous>
(/app/server.js:5:16)
2021-02-18T14:42:15.679847+00:00 app[web.1]: at Module._compile
(internal/modules/cjs/loader.js:1063:30)
2021-02-18T14:42:15.679847+00:00 app[web.1]: at
Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
2021-02-18T14:42:15.679848+00:00 app[web.1]: at Module.load
(internal/modules/cjs/loader.js:928:32)
2021-02-18T14:42:15.679848+00:00 app[web.1]: at Function.Module._load
(internal/modules/cjs/loader.js:769:14)
2021-02-18T14:42:15.679849+00:00 app[web.1]: at
Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:72:12)
2021-02-18T14:42:15.679850+00:00 app[web.1]: at
internal/main/run_main_module.js:17:47 {
2021-02-18T14:42:15.679850+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2021-02-18T14:42:15.679850+00:00 app[web.1]: requireStack: [
'/app/server.js' ]
2021-02-18T14:42:15.679851+00:00 app[web.1]: }
2021-02-18T14:42:15.697511+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-02-18T14:42:15.698033+00:00 app[web.1]: npm ERR! errno 1
2021-02-18T14:42:15.706610+00:00 app[web.1]: npm ERR! [email protected]
start: `node server.js`
2021-02-18T14:42:15.706919+00:00 app[web.1]: npm ERR! Exit status 1
2021-02-18T14:42:15.707107+00:00 app[web.1]: npm ERR!
2021-02-18T14:42:15.707250+00:00 app[web.1]: npm ERR! Failed at the
[email protected] start script.
2021-02-18T14:42:15.707371+00:00 app[web.1]: npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
2021-02-18T14:42:15.716447+00:00 app[web.1]:
2021-02-18T14:42:15.716824+00:00 app[web.1]: npm ERR! A complete log of this
run can be found in:
2021-02-18T14:42:15.717002+00:00 app[web.1]: npm ERR!
/app/.npm/_logs/2021-02-18T14_42_15_708Z-debug.log
2021-02-18T14:42:15.790661+00:00 heroku[web.1]: Process exited with status 1
2021-02-18T14:42:15.939560+00:00 heroku[web.1]: State changed from starting
to crashed
Herou nodejs version 14.15.5 and local 14.15.4
The code of my server.js file in my webhook is the following:
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
const mongoose = require('mongoose');
const config = require("../chatbotDialogflowNodejs/config");
const port = process.env.PORT || 3000;
// for parsing json
app.use(
bodyParser.json({
limit: "20mb",
})
);
// parse application/x-www-form-urlencoded
app.use(
bodyParser.urlencoded({
extended: false,
limit: "20mb",
})
);
mongoose.connect(
config.MONGODB, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
useCreateIndex: true
}, (err, res) => {
if (err) return console.log("Hubo un error en la BD ", err);
console.log("BD online");
}
);
app.use("/messenger", require("./Facebook/facebookBot"));
//Siempre las rutas dentro del archivo api empezaran con /api/
app.use("/api", require("./routes/api"));
app.get("/", (req, res) => {
return res.send("Chatbot Funcionando ???");
});
app.listen(port, () => {
console.log(`Escuchando peticiones en el puerto ${port}`);
});
I hope someone can help me, thank you very much!
I am trying to make my app shareable by users on whatsapp, fb and twitter, I have seen that it is possible with intent like this:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.mensajeShared));
intent.setPackage("com.whatsapp");
startActivity(intent);
So far so good, the problem I'm facing is that I'm trying to have a reward system, and the user cannot receive said reward unless it is confirmed that he DID send or share said text and not only clicked the button, no I have an idea how to do this confirmation, I hope someone can help me. Thanks in advance.
What I am looking for is that my android application sends a notification after certain days without interacting with my application, I know how to launch the push notification through firebase (that would be how I would send it) with java, but I have no idea how to know how much It has been unused for a long time and how to check it in the background. Thanks.
I'm trying to make it so that when the user enters a specific JFrame the Cursor disappears and doesn't reappear until they move the mouse and the MouseMotionListener detects it, if anyone has an idea how to do it I would really appreciate your help.
I'm starting to work with Ionic and it uses an extension called scss which is for styles just like css, and although I've seen that they work the same, I'd like to know if there are any notable differences between them.
I need an alternative function CONCAT
in SQL. The reason is that they are asking me in a school project to be able to use, for example, an alternative to the already mentioned function in the following search:
SELECT CONCAT(A.NOMBRE, A.A_PATERNO, A.A_MATERNO) NOMBRE, M.NOMBRE
FROM ALUMNOS A, MATERIAS M, CALIFICACIONES C
WHERE A.NUM_CONTROL=C.NUM_CONTROL AND M.CVE_MATERIA=C.CVE_MATERIA;
I have a problem that I cannot detect what is happening when placing some Jlabels with images inside a JFrame, I have managed to place them "Correctly", with the exception of always the last label, it places it in a position of X and And, which doesn't make sense, I leave you the necessary code and an image of what it does to me. I hope someone can help me I've been with this problem for hours without being able to solve it, thanks in advance.
This is the code of the JFrame class with the labels:
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Tablero extends JFrame{
private Inicio origen;
public Tablero() {
this.setSize(816, 710);
this.setLocationRelativeTo(null);
this.setResizable(false);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
for (int i = 0; i < 6; i++) {
JLabel p=new JLabel();
p.setIcon(new ImageIcon("src\\tablero\\"+i+".png"));
p.setBounds(136*i, 554, 136, 136);
this.add(p);
}
}
P.S. From this class I create the object and display it through another JFrame that is simple to start. The images contained in the labels have numerical names to facilitate access to them.
I'm new to java and I have a doubt about what to do to check if a space in an array of integers does not have an assigned value. What I want to do is a method that receives an int array and returns the same but without the possible empty spaces of the array that I entered as a parameter, thus returning only the numbers in the parameter array.
I have a problem with the following code:
public class Recursividad1 {
public static void main(String[] args) {
System.out.println("El factorial es: "+NumeroEntero.getFactorial(5));
System.out.println("El factorial es: "+NumeroEntero.getPotencia(5, 2));
}
}
and this is the class where the recursive methods are:
public class NumeroEntero {
private static int devuelveFactorial(int numero) {
if (numero == 0) {
return 1;
} else {
return numero * devuelveFactorial(numero--);
}
}
private static int devuelvePotencia(int valor, int potencia) {
if (potencia == 0) {
return 1;
} else {
return valor * devuelvePotencia(valor,potencia--);
}
}
public static int getPotencia(int valor2, int potencia2){
return devuelvePotencia(valor2, potencia2);
}
public static int getFactorial(int numero2){
return devuelveFactorial(numero2);
}
}