+1
Answered

Any idea what is making webviews return 404s unless it's the first launch of the app in Fusebox?

thillsman 7 years ago updated 7 years ago 3
I've run into an extremely frustrating issue where the following happens:

- An action (tapping on a button) creates a webview and passes it the URL through a create tag parameter.

- The webview works perfectly, showing the relevant URL.

- Tapping on the button triggers the action again (deletes first webview, creates a new one with URL parameter) but this time webview returns 404

- Tapping on a sibling button (runs the same action, with a different URL in the create tag) returns a 404

- Closing the app in Fusebox (with the orange triangle) and relaunching it doesn't fix anything, still returns the 404

- Force quitting Fusebox, relaunching it from the home screen, reopening the app, and tapping the button to trigger the action is the only way to get the page to return as normal.

Here are things I've tried to troubleshoot:

- Check to see if the URL is returning the actual page. It always is.

- Set an alert in the action that returns the URL that I'm passing to the class via the create tag. It's always correct.

- Set an alert in the action that returns the actual URL attribute from the webview. This shows "nil" when the webview is blank. Even though I just assigned the URL to the variable I'm passing the webview.

- Also, I know this is hitting my server, because it has a unique "Page not found" page. Which makes the "nil" return even weirder.

Here's the relevant piece of code:


<platform device="iphone|ipod|androidphone">
<create class="tweetbox" target="BG" tweeturl="[var:weburl]" eventname="[var:eventname]"/>
</platform>
<platform device="ipad|androidtablet">
<sync>
<delete target="SCHEDULEPAGE"/>
<delete target="ATTENDEES"/>
<delete target="TWEETBOX2"/>
<delete target="SESSIONPAGE"/>
<create class="tweetbox2" target="LEVEL3" weburl="[var:weburl]"/>
<scroll page="2" target="TABLETPAGER" />
<alert message="[object:TWEETBOX2/tweetwebview.url]" />
</sync>
</platform>
<alert message="[var:weburl]" />
<alpha value="1" time="0" target="ATTENDEELOADING" />


Any ideas?
Rapid follow-up:

It's possible it's a server/hosting issue, maybe? As a last ditch post-midnight effort, I made a copy of the file on a different server and pointed the app there. It's loading all perfect now. Also, the [object:X.url] alert still shows "nil" so maybe that's not a legit object variable.

Interesting.
url is not a valid object property, so you would not be seeing that alert the way you have created it.

As far as the 404, I don't see how that would be a wire issue. Must have been a weird spot on your server.
Ok, cool. It was probably a weird server thing. Good to know about url not being an object property. Thanks, Ian!