question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing onOpen function in v2

See original GitHub issue

Bug report

Describe the bug

In v1 we had a function called onOpen, which called a callback whenever the websocket was first established or reconnected. When I use my app with Supabase I have some disconnections and I listen for reconnection events in order to refetch pobbile stale data. It was so useful. In V2 it is missing and I’ve not found any new implementation, nor it is mentioned in docs. At the actual state for me it’s a regression. Is there a reason for its removal? I don’t think it could create race-conditions or other issues.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Expected behavior

Expect that onOpen is still present in V2 or at least a valid implementation of the old behaviour

Screenshots

Screenshot not needed I think

System information

Not needed. The implementation is not found in the source code

Additional context

PR that changed this behaviour: #194

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ruggi99commented, Oct 25, 2022

@w3b6x9 Haven’t tried yet but I think it does what I’m looking for. Also provides a more granular refetching method.

Will test and reopen if something goes wrong

Thanks

0reactions
w3b6x9commented, Oct 26, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

function onOpen() is not running - google apps script
No. The onOpen function is still not running on open. Users are forced to go into Tools>Script Manager> select it, and click Run...
Read more >
google sheets - onOpen doesn't execute
Am I missing something here? Just seems like the functions will not run at all. My understanding of triggers is that I shouldn't...
Read more >
Issues which onOpen(e) apps script function - Google Support
I have created an apps script function which makes an alert appear when you open the spreadsheet ( onOpen(e) ). Here is the...
Read more >
Troubleshooting | Apps Script - Google Developers
Library is missing​​ The reason might be that too many people are accessing the library at the same time. To avoid this error,...
Read more >
Google Apps Script: A Beginner's Guide
To run onOpen() from the editor window, first select then run the onOpen function as shown in this image: Google Apps Script Function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found