React Native source maps (and breakpoints) in Chrome not matching - react-native

Is anyone having the issue where when they add breakpoints in the Sources tab they can't add them to most lines, and when you do, the debugger breaks on another line.
The source maps don't seem to be matching up properly. I'm using my actual device. Not sure if that's an issue. Are there any additional setup requirements for debugging in chrome other than what is mentioned here:
https://facebook.github.io/react-native/docs/debugging.html
???

Related

How to solve _OBJC_CLASS_$ reference error

We have a standalone video playback app, in which we have Chromecast working fine. Now we are trying to convert this app as a framework and add it in the parent app.
While building framework, reference error pops up. If I comment out the code in RNGoogleCast.m, where these classes [see attached image] are referenced then the framework builds successfully and works fine with parent app. With commented code, I don't see the chromecast button while playing video.
In Build Setting of Framework, other linker flags set to -ObjC. If I remove it or keep the same value as an app, then frameworks build successfully but don't work with the parent app.
Please let me know if you need more information from the app or framework.
Can someone help me to get rid of these errors and get the chromecast button enabled while playing video?
Also, raised issue here: https://github.com/react-native-google-cast/react-native-google-cast/issues/126
Linker errors come when you're trying to use certain classes and the linker doesn't know where they come from. Chances are, you imported the correct header files, but you have not added linked frameworks/libraries that contain the GCK* classes.
To fix this issue, you should go to your project settings, then build phases. Open the dropdown menu "Link Binary With Libraries", and from here you can click the plus to add the framework/library. In your case, I believe it's GoogleCast.framework. With Cast, there are a few extra steps listed here: https://developers.google.com/cast/docs/ios_sender

Cypress: type tab key

I want to test that my forms are accessible and that I can tab between my input elements. I found this github issue asking for the feature here:
https://github.com/cypress-io/cypress/issues/299
Currently I try to do .type('{tab}') and I get the following error:
CypressError: {tab} isn't a supported character sequence. You'll want to use the command cy.tab(), which is not ready yet, but when it is done that's what you'll use.
Is there a current workaround for the lack of tab support?
The Cypress team is currently working on implementing tab support along with other keyboard keys as part of Native Events
In the meantime I've made a plugin that adds a .tab() command. cypress-plugin-tab:
This enables you to do:
cy.get('input').tab()
// and
cy.get('input').tab({shift: true})
However, the actual tab implementation will not be a separate command, so know if you use this plugin, you'll have to refactor your test code when Native Events lands
As the cypress documentation says:
In the meantime, you can use the experimental cypress-plugin-tab and can thumbs up this issue.

"Cannot Adjust current top of stack beyond available views" - Error only when Debug in Chrome is turned Off

I'm having an issue where I get the above error, but only when on my hardware ios device, or emulator debugging is turned off. IF it is on, it works fine in the ios 6 simulator.
Any ideas?
I found the answer.
Interestingly, React-Native seems to use a different version of Javascript when the debugger is on. I was trying to use a ES5 function for formatting text as currency, and it worked fine as long as the debugger (and browser) are on. However, turning this off forces react-native to use their specific javascript core which did not support that javascript function.
I fixed it by using a different function. The error should be more specifc to explain you are doing something illegal.

Displaying PDF on website using pdf.js

I want to put a file sample.pdf on my website, and want it to be displayed using pdf.js. What I want is to display my own file like the demo, with a toolbar, zooming in/out, etc. So far I can't do that yet.
I did check out the helloworld example, but it simply shows the file like an image, without toolbar, zooming in/out, etc. When I put another file with many pages instead of helloworld.pdf, it just shows the first page.
I am not quite sure what you are looking for but I was able to get this working exactly like the demo. Although you may not want to use that example viewer for your project, you can use the working code as a starting point for your own requirements.
For a simple test you can just clone the project somewhere under a web server into a directory like myproject and visit http://yourservername.com/myproject/web/viewer.html. You should see the pdf appear. This can be a starting point to working with this project. I did this running a very basic Apache server on Linux.
If you are not looking for an example styled like that the demo above you can also see this jsbin from the docs that show how to do something completely customized with working next/previous buttons to move between the pages (as you mentioned you were only seeing the first page).
As a note, it seems that this library does not work properly with Safari. You can see an issue about it here. Unfortunately this makes it unusable for me now as I need to support all current browsers.
Also, remember to watch for the warnings concerning CORS.

Problems Embedding Video using FCK Editor

I am using FCK Editor 2.6.4 and having problems trying to embed a (non-YouTube) video into a content area.
I found this previous question / post:
[EDIT -- as a new user, I am only able to post one link in this post. The post in question is titled, "Can I embed video using FCK Editor?")
and have investigated all of the proposed solutions, but none of them work properly:
1 -- Using the "Embed Flash" button in the control panel almost works. However, the video I am attempting to add contains a querystring with parameters, like this:
http://static.animoto.com/swf/w.swf?w=swf/vp1&e=1275795594&f=mGQklEgxXKs9vfEIdGnWsA&d=132&m=p&r=w&i=m&ct=Homes%20in%20Eagle%20Creek&cu=http://hometoindy.com/eagle-creek-real-estate.php&options=
and in using the Flash embed tool, it encodes all of the "&" characters to "& amp;", thus breaking them. If it were just for me, I could manually change them back, but clients who use this will not know how to do that.
2 -- I have installed the YouTube video plugin, and it works great... for YouTube. But it cannot be used to embed non-YouTube videos (it automatically changes the URL to YouTube, no matter what).
3 -- I have installed the EmbedMovies plugin, but it throws a javascript error when attempting to add a video file (such as the above) to a page. (The EmbedMovies plugin page on SourceForge says it has been updated for FCK Editor 2.6, but it does not work.)
4 -- Pasting directly into the editor window (of course) does not work. The only way I've been able to make this work is by pasting into the Source panel, and this is not a good option for clients who are not familiar with HTML.
So, is there a good, working plugin for FCK editor that will allow me to quickly and easily embed a video such as the one above into a content area? I don't need to be able to see or preview it in the editor window; I just need it to work when the page is loaded on the front end.
Thanks!
Given the question you found, and scarcity of answers to that, chances are that the plugin you want does not exist.
If your videos are actually from one, though non-standard, source, I can only repeat my advice from that topic - write your own plugin. I have code of plugin I wrote linked there, it should be easy to change it to accomodate your needs.