Skip to content

Commit

Permalink
fixing the install request error caused by missing ps4 default port
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkiokan committed Jan 3, 2022
1 parent dff236f commit c274a1c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const isDevelopment = process.env.NODE_ENV !== 'production'

const showServerWindowOnStartUp = false
const showServerDevtools = false

const showPS4DevTools = false
const showMainDevTools = process.env.NODE_ENV !== 'production'

// global reference to mainWindow (necessary to prevent window from being garbage collected)
Expand Down Expand Up @@ -60,7 +60,7 @@ function createServerWindow(){
function createInfoWindow(){
const window = helper.createWindowInstance('/info', {
width: 340, height: 600, title: 'Info', show: false,
}, true)
}, false)
window.on('close', (event) => {
event.preventDefault()
window.hide()
Expand All @@ -73,7 +73,7 @@ function createInfoWindow(){
function createPS4Window(){
const window = helper.createWindowInstance('/ps4', {
width: 800, height: 800, title: 'PS4', show: false,
})
}, showPS4DevTools)
window.on('close', (event) => {
event.preventDefault()
window.hide()
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/pages/Changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<h4>Handling Errors </h4>
<p>
Adding global error catcher and crashReporter for debugging purposes. <br>
Fixing the Install request Error, because port was missing on the default ps4 config. <br>
Thanks for iceMongus and CyB1K for testing with me. <br>
</p>
</el-timeline-item>
<el-timeline-item timestamp="2.4.0" placement="top">
Expand Down
9 changes: 7 additions & 2 deletions src/renderer/plugins/ps4.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ let ps4 = {
request(url, data, options={}){
let defaultOptions = { headers: { 'content-type':'application/x-www-form-urlencoded' } }

console.log("Request", url, data, options)
return axios.post(url, data, { ...defaultOptions, ...options})
.catch( e => {
console.log("PS4 Plugin Error catcher", e)
Expand All @@ -109,7 +110,8 @@ let ps4 = {
throw e
}

if(e.status == 500 || e.response.status == 500){
//if(e.status == 500 || e.response.status == 500){
if(e.status == 500){
console.log(e, e.response)
ipcRenderer.send('main-error', e.response.data.error)
throw e
Expand All @@ -123,11 +125,14 @@ let ps4 = {
// message: "Network Error. <br>Is the Remote Pakage Installer is running on Playstation?",
// type: 'error'
// })
throw e
}
})
.then( response => {
console.log("PS4 API Response", response)

let data = response.data
console.log("PS4 API Response", data)

if(data.status && data.status == 'fail'){
// Found Error Codes
// 2157510677 error on double install?
Expand Down
1 change: 1 addition & 0 deletions src/renderer/store/modules/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const state = {
ps4: {
ip: '',
name: '',
port: 12800,
},

}
Expand Down

0 comments on commit c274a1c

Please sign in to comment.