Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

HMI Uncaught ReferenceError during processing SetDisplayLayout(displayLayout = DEFAULT) #534

Closed
VjKlepikov opened this issue Mar 23, 2021 · 5 comments
Labels

Comments

@VjKlepikov
Copy link
Contributor

VjKlepikov commented Mar 23, 2021

Description:
HMI Uncaught ReferenceError during processing SetDisplayLayout(displayLayout = DEFAULT)

Precondition:

  1. SDL and HMI are started
  2. Media mobile app is registered and activated

Steps to reproduce:

  1. App requests SetDisplayLayout(displayLayout = DEFAULT)

Expected result:
HMI responds with
{"success":true,"resultCode":"SUCCESS"}
HMI applies appropriate template

Actual result:
SDL -> HMI [10:48:44:366]: {"id":601,"jsonrpc":"2.0","method":"UI.SetDisplayLayout","params":{"appID":1246083497,"displayLayout":"DEFAULT"}}
UIRPC.js:157 FFW.UI.onRPCRequest
UIRPC.js:514 FFW.UI.SetDisplayLayoutResponse
UIRPC.js:517 Uncaught ReferenceError: Cannot access 'model' before initialization
at d.onRPCRequest (UIRPC.js:517)
at d [as onRPCRequest] (ember-1.0.pre.min.js:14)
at d.onWSMessage (RPCClient.js:190)
at WebSocket.socket.onmessage (RPCClient.js:81)

Environment:
SDL: https://github.com/smartdevicelink/sdl_core/tree/7.1.0-RC1
HMI: https://github.com/smartdevicelink/sdl_hmi/tree/develop (7fad546)
SPT: SPT: 20210305-Android (1076)

@Ypostolov
Copy link
Contributor

@jordynmackool This issue is reproduced on HMI because SetDisplayLayout is deprecated RPC in HMI_API.xml, to fix the issue we can delete all the relevant code on HMI, please advise whether this solution is acceptable?

@Jack-Byrne
Copy link
Collaborator

Jack-Byrne commented Apr 21, 2021

@Ypostolov Deprecated does not yet mean removed, we should look at fixing the javascript error. Maybe in future we can create a core change for transforming set display layout requests into show requests for the hmi.

@Jack-Byrne
Copy link
Collaborator

Jack-Byrne commented May 7, 2021

Entered a proposal for replacing UI.SetDisplayLayout with UI.Show: smartdevicelink/sdl_evolution#1136

@Ypostolov
Copy link
Contributor

@jordynmackool PR with fix is ready for Livio review. Thank you.

@Jack-Byrne
Copy link
Collaborator

Fixed by #566

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants